public function __construct() {
parent::__construct();
- $this->mDescription = "Runs parsing/syntax checks on JavaScript files";
+ $this->addDescription( 'Runs parsing/syntax checks on JavaScript files' );
$this->addArg( 'file(s)', 'JavaScript file to test', false );
}
$parser = new JSParser();
foreach ( $files as $filename ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$js = file_get_contents( $filename );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( $js === false ) {
$this->output( "$filename ERROR: could not read file\n" );
$this->errs++;