X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfindDeprecated.php;h=bc1b34aa67f9b988b82558d65a9504f1c5fda377;hb=3302e11b23301ee55196b372c1cf5ff48a5ab6c3;hp=cbb1d5bf1944ca0e8f8758adf82c16e3c23194b8;hpb=a41102bd565bac6589f38593fcdec0e60225b2fc;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/findDeprecated.php b/maintenance/findDeprecated.php index cbb1d5bf19..bc1b34aa67 100644 --- a/maintenance/findDeprecated.php +++ b/maintenance/findDeprecated.php @@ -53,7 +53,7 @@ class DeprecatedInterfaceFinder extends FileAwareNodeVisitor { private $currentClass = null; - private $foundNodes = array(); + private $foundNodes = []; public function getFoundNodes() { // Sort results by version, then by filename, then by name. @@ -105,19 +105,18 @@ class DeprecatedInterfaceFinder extends FileAwareNodeVisitor { $name = $node->name; } - $this->foundNodes[ $version ][] = array( + $this->foundNodes[ $version ][] = [ 'filename' => $node->filename, 'line' => $node->getLine(), 'name' => $name, 'hard' => $this->isHardDeprecated( $node ), - ); + ]; } return $retVal; } } - /** * Maintenance task that recursively scans MediaWiki PHP files for deprecated * functions and interfaces and produces a report. @@ -125,7 +124,7 @@ class DeprecatedInterfaceFinder extends FileAwareNodeVisitor { class FindDeprecated extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Find deprecated interfaces'; + $this->addDescription( 'Find deprecated interfaces' ); } public function getFiles() { @@ -159,7 +158,7 @@ class FindDeprecated extends Maintenance { } $finder->setCurrentFile( substr( $file->getPathname(), strlen( $IP ) + 1 ) ); - $nodes = $parser->parse( $code, array( 'throwOnError' => false ) ); + $nodes = $parser->parse( $code, [ 'throwOnError' => false ] ); $traverser->traverse( $nodes ); if ( $i % $chunkSize === 0 ) {