Update nikic/php-parser to 3.1.3
[lhc/web/wiklou.git] / maintenance / findDeprecated.php
index 94b7fb4..ec998da 100644 (file)
@@ -69,6 +69,8 @@ class DeprecatedInterfaceFinder extends FileAwareNodeVisitor {
        /**
         * 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 ) {
@@ -130,6 +132,9 @@ class FindDeprecated extends Maintenance {
                $this->addDescription( 'Find deprecated interfaces' );
        }
 
+       /**
+        * @return SplFileInfo[]
+        */
        public function getFiles() {
                global $IP;
 
@@ -161,7 +166,7 @@ class FindDeprecated extends Maintenance {
                        }
 
                        $finder->setCurrentFile( substr( $file->getPathname(), strlen( $IP ) + 1 ) );
-                       $nodes = $parser->parse( $code, [ 'throwOnError' => false ] );
+                       $nodes = $parser->parse( $code );
                        $traverser->traverse( $nodes );
 
                        if ( $i % $chunkSize === 0 ) {