Deprecating: Consolidating `progressive` & `constructive` buttons
[lhc/web/wiklou.git] / maintenance / checkSyntax.php
index d1c2edd..4821e04 100644 (file)
@@ -36,7 +36,7 @@ class CheckSyntax extends Maintenance {
 
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Check syntax for all PHP files in MediaWiki";
+               $this->addDescription( 'Check syntax for all PHP files in MediaWiki' );
                $this->addOption( 'with-extensions', 'Also recurse the extensions folder' );
                $this->addOption(
                        'path',
@@ -121,9 +121,9 @@ class CheckSyntax extends Maintenance {
                        return; // process only this path
                } elseif ( $this->hasOption( 'list-file' ) ) {
                        $file = $this->getOption( 'list-file' );
-                       wfSuppressWarnings();
+                       MediaWiki\suppressWarnings();
                        $f = fopen( $file, 'r' );
-                       wfRestoreWarnings();
+                       MediaWiki\restoreWarnings();
                        if ( !$f ) {
                                $this->error( "Can't open file $file\n", true );
                        }