original_string: protected function preparePaths(string $folder, array $paths, string $fileNames = ''): string
      {
          foreach ($paths as $path) {
              if (dirname($path) != $folder) {
                  return ''; // all source paths must be the same
              }
              if ($fileNames != '') {
                  $fileNames .= ':';
              }
              $fileNames .= basename($path);
          }
  
          return $fileNames;
      }
code: protected function preparePaths(string $folder, array $paths, string $fileNames = ''): string
      {
          foreach ($paths as $path) {
              if (dirname($path) != $folder) {
                  return ''; // all source paths must be the same
              }
              if ($fileNames != '') {
                  $fileNames .= ':';
              }
              $fileNames .= basename($path);
          }
  
          return $fileNames;
      }
code_tokens: protected function preparePaths ( string $ folder , array $ paths , string $ fileNames = '' ) : string { foreach ( $ paths as $ path ) { if ( dirname ( $ path ) != $ folder ) { return '' ; // all source paths must be the same } if ( $ fileNames != '' ) { $ fileNames .= ':' ; } $ fileNames .= basename ( $ path ) ; } return $ fileNames ; }
docstring: check source folders paths and build the file_names string
  
  @param string $folder    Folder path
  @param array  $paths     Paths of files
  @param string $fileNames Optional file names
  
  @return string
docstring_tokens: check source folders paths and build the file_names string