original_string: public function handleUploadedFiles(UploadedFile $file, $extension, $dir)
      {
          $original_file = $file->getClientOriginalName();
          $path_parts = pathinfo($original_file);
  
          $increment = '';
          while (file_exists($dir . FileManager::DS . $path_parts['filename'] . $increment . '.' . $extension)) {
              $increment++;
          }
  
          $basename = $path_parts['filename'] . $increment . '.' . $extension;
          $file->move($dir, $basename);
      }
code: public function handleUploadedFiles(UploadedFile $file, $extension, $dir)
      {
          $original_file = $file->getClientOriginalName();
          $path_parts = pathinfo($original_file);
  
          $increment = '';
          while (file_exists($dir . FileManager::DS . $path_parts['filename'] . $increment . '.' . $extension)) {
              $increment++;
          }
  
          $basename = $path_parts['filename'] . $increment . '.' . $extension;
          $file->move($dir, $basename);
      }
code_tokens: public function handleUploadedFiles ( UploadedFile $ file , $ extension , $ dir ) { $ original_file = $ file -> getClientOriginalName ( ) ; $ path_parts = pathinfo ( $ original_file ) ; $ increment = '' ; while ( file_exists ( $ dir . FileManager :: DS . $ path_parts [ 'filename' ] . $ increment . '.' . $ extension ) ) { $ increment ++ ; } $ basename = $ path_parts [ 'filename' ] . $ increment . '.' . $ extension ; $ file -> move ( $ dir , $ basename ) ; }
docstring: Upload the files
  
  @param UploadedFile $file
  @param string       $extension
  @param string       $dir
docstring_tokens: Upload the files