/**
* Check whether a function or method includes a call to wfDeprecated(),
* indicating that it is a hard-deprecated interface.
+ * @param PhpParser\Node $node
+ * @return bool
*/
public function isHardDeprecated( PhpParser\Node $node ) {
+ if ( !$node->stmts ) {
+ return false;
+ }
foreach ( $node->stmts as $stmt ) {
if (
$stmt instanceof PhpParser\Node\Expr\FuncCall
$files = $this->getFiles();
$chunkSize = ceil( count( $files ) / 72 );
- $parser = new PhpParser\Parser( new PhpParser\Lexer\Emulative );
+ $parser = ( new PhpParser\ParserFactory )->create( PhpParser\ParserFactory::PREFER_PHP7 );
$traverser = new PhpParser\NodeTraverser;
$finder = new DeprecatedInterfaceFinder;
$traverser->addVisitor( $finder );