original_string: public function parseFile($path)
      {
          $factory = new ParserFactory();
          $parser  = $factory->create(ParserFactory::PREFER_PHP7);
  
          try {
              $statements = $parser->parse($this->loadFile($path));
          } catch (Error $e) {
              throw new \RuntimeException(sprintf('Failed to parse %s file due to parse error: %s', $path, $e->getMessage()), 0, $e);
          }
          if ($statements === null) {
              throw new \RuntimeException(sprintf('Failed to parse %s', $path));
          }
  
          return $statements;
      }
code: public function parseFile($path)
      {
          $factory = new ParserFactory();
          $parser  = $factory->create(ParserFactory::PREFER_PHP7);
  
          try {
              $statements = $parser->parse($this->loadFile($path));
          } catch (Error $e) {
              throw new \RuntimeException(sprintf('Failed to parse %s file due to parse error: %s', $path, $e->getMessage()), 0, $e);
          }
          if ($statements === null) {
              throw new \RuntimeException(sprintf('Failed to parse %s', $path));
          }
  
          return $statements;
      }
code_tokens: public function parseFile ( $ path ) { $ factory = new ParserFactory ( ) ; $ parser = $ factory -> create ( ParserFactory :: PREFER_PHP7 ) ; try { $ statements = $ parser -> parse ( $ this -> loadFile ( $ path ) ) ; } catch ( Error $ e ) { throw new \ RuntimeException ( sprintf ( 'Failed to parse %s file due to parse error: %s' , $ path , $ e -> getMessage ( ) ) , 0 , $ e ) ; } if ( $ statements === null ) { throw new \ RuntimeException ( sprintf ( 'Failed to parse %s' , $ path ) ) ; } return $ statements ; }
docstring: Parse a PHP file.
  
  @param string $path File path
  
  @throws \Exception
  
  @return \PhpParser\Node[]
docstring_tokens: Parse a PHP file .