original_string: private function readPatterns(string $filename): array
    {
      $path  = $this->basedir.'/'.$filename;
      $lines = explode(PHP_EOL, file_get_contents($path));
  
      $patterns = [];
      foreach ($lines as $line)
      {
        $line = trim($line);
        if ($line<>'')
        {
          $patterns[] = $line;
        }
      }
  
      return $patterns;
    }
code: private function readPatterns(string $filename): array
    {
      $path  = $this->basedir.'/'.$filename;
      $lines = explode(PHP_EOL, file_get_contents($path));
  
      $patterns = [];
      foreach ($lines as $line)
      {
        $line = trim($line);
        if ($line<>'')
        {
          $patterns[] = $line;
        }
      }
  
      return $patterns;
    }
code_tokens: private function readPatterns ( string $ filename ) : array { $ path = $ this -> basedir . '/' . $ filename ; $ lines = explode ( PHP_EOL , file_get_contents ( $ path ) ) ; $ patterns = [ ] ; foreach ( $ lines as $ line ) { $ line = trim ( $ line ) ; if ( $ line <> '' ) { $ patterns [ ] = $ line ; } } return $ patterns ; }
docstring: Reads a list of patterns from a file.
  
  @param string $filename The name of the file with a list of patterns.
  
  @return string[]
docstring_tokens: Reads a list of patterns from a file .