original_string: private function findSourcesInPattern(string $pattern): array
    {
      $sources = [];
  
      $directory = new RecursiveDirectoryIterator(self::getLeadingDir($pattern));
      $directory->setFlags(RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
      $files = new RecursiveIteratorIterator($directory);
      foreach ($files as $fullPath => $file)
      {
        // If the file is a source file with stored routine add it to my sources.
        if ($file->isFile() && SelectorHelper::matchPath($pattern, $fullPath))
        {
          $sources[] = $fullPath;
        }
      }
  
      return $sources;
    }
code: private function findSourcesInPattern(string $pattern): array
    {
      $sources = [];
  
      $directory = new RecursiveDirectoryIterator(self::getLeadingDir($pattern));
      $directory->setFlags(RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
      $files = new RecursiveIteratorIterator($directory);
      foreach ($files as $fullPath => $file)
      {
        // If the file is a source file with stored routine add it to my sources.
        if ($file->isFile() && SelectorHelper::matchPath($pattern, $fullPath))
        {
          $sources[] = $fullPath;
        }
      }
  
      return $sources;
    }
code_tokens: private function findSourcesInPattern ( string $ pattern ) : array { $ sources = [ ] ; $ directory = new RecursiveDirectoryIterator ( self :: getLeadingDir ( $ pattern ) ) ; $ directory -> setFlags ( RecursiveDirectoryIterator :: FOLLOW_SYMLINKS ) ; $ files = new RecursiveIteratorIterator ( $ directory ) ; foreach ( $ files as $ fullPath => $ file ) { // If the file is a source file with stored routine add it to my sources. if ( $ file -> isFile ( ) && SelectorHelper :: matchPath ( $ pattern , $ fullPath ) ) { $ sources [ ] = $ fullPath ; } } return $ sources ; }
docstring: Finds sources of stored routines in a pattern.
  
  @param string $pattern The pattern of the sources.
  
  @return string[]
docstring_tokens: Finds sources of stored routines in a pattern .