original_string: private function getFileMap(PackageInterface $package, $directory)
      {
          $files = [];
          $root  = $this->getInstallPath($package);
  
          if (!file_exists($root . '/' . $directory)) {
              return [];
          }
  
          $iterator = new RecursiveDirectoryIterator($root . '/' . $directory, RecursiveDirectoryIterator::SKIP_DOTS);
  
          /** @var SplFileInfo $file */
          foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {
              if ($file->isFile()) {
                  $path = str_replace($root . '/' . $directory . '/', '', $file->getPathname());
  
                  $files[$directory . '/' . $path] = $path;
              }
          }
  
          return $files;
      }
code: private function getFileMap(PackageInterface $package, $directory)
      {
          $files = [];
          $root  = $this->getInstallPath($package);
  
          if (!file_exists($root . '/' . $directory)) {
              return [];
          }
  
          $iterator = new RecursiveDirectoryIterator($root . '/' . $directory, RecursiveDirectoryIterator::SKIP_DOTS);
  
          /** @var SplFileInfo $file */
          foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {
              if ($file->isFile()) {
                  $path = str_replace($root . '/' . $directory . '/', '', $file->getPathname());
  
                  $files[$directory . '/' . $path] = $path;
              }
          }
  
          return $files;
      }
code_tokens: private function getFileMap ( PackageInterface $ package , $ directory ) { $ files = [ ] ; $ root = $ this -> getInstallPath ( $ package ) ; if ( ! file_exists ( $ root . '/' . $ directory ) ) { return [ ] ; } $ iterator = new RecursiveDirectoryIterator ( $ root . '/' . $ directory , RecursiveDirectoryIterator :: SKIP_DOTS ) ; /** @var SplFileInfo $file */ foreach ( new RecursiveIteratorIterator ( $ iterator , RecursiveIteratorIterator :: CHILD_FIRST ) as $ file ) { if ( $ file -> isFile ( ) ) { $ path = str_replace ( $ root . '/' . $ directory . '/' , '' , $ file -> getPathname ( ) ) ; $ files [ $ directory . '/' . $ path ] = $ path ; } } return $ files ; }
docstring: Generate a file map from the passed directory.
  
  @param PackageInterface $package   The package being processed.
  
  @param string           $directory The name of the directory to extract.
  
  @return array
docstring_tokens: Generate a file map from the passed directory .