X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FfindDeprecated.php;h=ec998da6a2996504f257964512945e9547278838;hp=94b7fb4429222c1808506e1abc8c14a3542dec55;hb=19124fd1d24d0426743c6e0dd83a5a9eae896e66;hpb=59e7337ea612d03d08b67e6ada707e3d7ced738d diff --git a/maintenance/findDeprecated.php b/maintenance/findDeprecated.php index 94b7fb4429..ec998da6a2 100644 --- a/maintenance/findDeprecated.php +++ b/maintenance/findDeprecated.php @@ -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 ) {