Merge "Use the phan exit code directly"
[lhc/web/wiklou.git] / maintenance / generateJsonI18n.php
index b9c07fb..d3041d9 100644 (file)
@@ -35,7 +35,7 @@ require_once __DIR__ . '/Maintenance.php';
 class GenerateJsonI18n extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Build JSON messages files from a PHP messages file";
+               $this->addDescription( 'Build JSON messages files from a PHP messages file' );
 
                $this->addArg( 'phpfile', 'PHP file defining a $messages array', false );
                $this->addArg( 'jsondir', 'Directory to write JSON files to', false );
@@ -131,7 +131,7 @@ class GenerateJsonI18n extends Maintenance {
                        ) );
                        // Make sure the @metadata key is the first key in the output
                        $langmsgs = array_merge(
-                               array( '@metadata' => array( 'authors' => $authors ) ),
+                               [ '@metadata' => [ 'authors' => $authors ] ],
                                $langmsgs
                        );
 
@@ -187,7 +187,7 @@ class GenerateJsonI18n extends Maintenance {
                $matches = null;
                preg_match_all( '/@author (.*?)$/m', $comment, $matches );
 
-               return $matches && $matches[1] ? $matches[1] : array();
+               return $matches && $matches[1] ? $matches[1] : [];
        }
 }