*
* @file
* @ingroup Maintenance
+ * @phan-file-suppress PhanUndeclaredProperty Lots of custom properties
*/
require_once __DIR__ . '/Maintenance.php';
// Sort results by version, then by filename, then by name.
foreach ( $this->foundNodes as $version => &$nodes ) {
uasort( $nodes, function ( $a, $b ) {
- return ( $a['filename'] . $a['name'] ) < ( $b['filename'] . $b['name'] ) ? -1 : 1;
+ return ( $a['filename'] . $a['name'] ) <=> ( $b['filename'] . $b['name'] );
} );
}
ksort( $this->foundNodes );
$this->addDescription( 'Find deprecated interfaces' );
}
+ /**
+ * @return SplFileInfo[]
+ */
public function getFiles() {
global $IP;
}
$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 ) {
}
}
-$maintClass = 'FindDeprecated';
+$maintClass = FindDeprecated::class;
require_once RUN_MAINTENANCE_IF_MAIN;