original_string: protected function generateSequenceName(UploadedFile $file)
      {
          $index = 1;
          $extension = $file->getClientOriginalExtension();
          $originalName = $file->getClientOriginalName();
          $newName = $originalName.'_'.$index.'.'.$extension;
  
          while ($this->storage->exists("{$this->getDirectory()}/$newName")) {
              $index++;
              $newName = $originalName.'_'.$index.'.'.$extension;
          }
  
          return $newName;
      }
code: protected function generateSequenceName(UploadedFile $file)
      {
          $index = 1;
          $extension = $file->getClientOriginalExtension();
          $originalName = $file->getClientOriginalName();
          $newName = $originalName.'_'.$index.'.'.$extension;
  
          while ($this->storage->exists("{$this->getDirectory()}/$newName")) {
              $index++;
              $newName = $originalName.'_'.$index.'.'.$extension;
          }
  
          return $newName;
      }
code_tokens: protected function generateSequenceName ( UploadedFile $ file ) { $ index = 1 ; $ extension = $ file -> getClientOriginalExtension ( ) ; $ originalName = $ file -> getClientOriginalName ( ) ; $ newName = $ originalName . '_' . $ index . '.' . $ extension ; while ( $ this -> storage -> exists ( "{$this->getDirectory()}/$newName" ) ) { $ index ++ ; $ newName = $ originalName . '_' . $ index . '.' . $ extension ; } return $ newName ; }
docstring: Generate a sequence name for uploaded file.
  
  @param UploadedFile $file
  
  @return string
docstring_tokens: Generate a sequence name for uploaded file .