PHPStan\Parser\Parser::parseFile PHP Method

parseFile() public method

public parseFile ( string $file ) : array
$file string path to a file to parse
return array
    public function parseFile(string $file) : array;

Usage Example

Example #1
0
 /**
  * @param string $file path to a file to parse
  * @return \PhpParser\Node[]
  */
 public function parseFile(string $file) : array
 {
     if (!isset($this->cachedNodesByFile[$file])) {
         $this->cachedNodesByFile[$file] = $this->originalParser->parseFile($file);
     }
     return $this->cachedNodesByFile[$file];
 }
All Usage Examples Of PHPStan\Parser\Parser::parseFile