public function __construct() {
parent::__construct();
$this->saveFailed = false;
- $this->mDescription = "Run a file or dump with several parsers";
+ $this->addDescription( 'Run a file or dump with several parsers' );
$this->addOption( 'parser1', 'The first parser to compare.', true, true );
$this->addOption( 'parser2', 'The second parser to compare.', true, true );
$this->addOption( 'tidy', 'Run tidy on the articles.', false, false );
if ( $this->hasOption( 'tidy' ) ) {
global $wgUseTidy;
if ( !$wgUseTidy ) {
- $this->error( 'Tidy was requested but $wgUseTidy is not set in LocalSettings.php', true );
+ $this->fatalError( 'Tidy was requested but $wgUseTidy is not set in LocalSettings.php' );
}
$this->options->setTidy( true );
}
}
}
-$maintClass = "CompareParsers";
+$maintClass = CompareParsers::class;
require_once RUN_MAINTENANCE_IF_MAIN;