X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=maintenance%2FfindDeprecated.php;h=ae2ee421a8a0cfcfae6d87999a4708757456a17d;hb=2b6f3f0adc475da7eab1ef04dfe917e5536e6e10;hp=94b7fb4429222c1808506e1abc8c14a3542dec55;hpb=4a975b8099ee11b15421d03be02206935a8422f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/findDeprecated.php b/maintenance/findDeprecated.php index 94b7fb4429..ae2ee421a8 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 ) { @@ -197,5 +202,5 @@ class FindDeprecated extends Maintenance { } } -$maintClass = 'FindDeprecated'; +$maintClass = FindDeprecated::class; require_once RUN_MAINTENANCE_IF_MAIN;