X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgetConfiguration.php;h=3c679e6e7ad29fb48bdd4b6d10cd44c5d1197497;hb=444d768694c5b8868ecf283dc34b226f063c8a79;hp=58382014f83f79b1bb94f99fbb7bf05556f144e8;hpb=cb2896f90ebef77c02c9da4067b0e56e37471092;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getConfiguration.php b/maintenance/getConfiguration.php index 58382014f8..3c679e6e7a 100644 --- a/maintenance/getConfiguration.php +++ b/maintenance/getConfiguration.php @@ -34,26 +34,26 @@ class GetConfiguration extends Maintenance { protected $regex = null; - protected $settings_list = array(); + protected $settings_list = []; /** * List of format output internally supported. * Each item MUST be lower case. */ - protected static $outFormats = array( + protected static $outFormats = [ 'json', 'php', 'serialize', 'vardump', - ); + ]; public function __construct() { parent::__construct(); - $this->mDescription = "Get serialized MediaWiki site configuration"; + $this->addDescription( 'Get serialized MediaWiki site configuration' ); $this->addOption( 'regex', 'regex to filter variables with', false, true ); $this->addOption( 'iregex', 'same as --regex but case insensitive', false, true ); $this->addOption( 'settings', 'Space-separated list of wg* variables', false, true ); - $this->addOption( 'format', join( ', ', self::$outFormats ), false, true ); + $this->addOption( 'format', implode( ', ', self::$outFormats ), false, true ); } protected function validateParamsAndArgs() { @@ -112,7 +112,7 @@ class GetConfiguration extends Maintenance { public function execute() { // Settings we will display - $res = array(); + $res = []; # Sane default: dump any wg / wmg variable if ( !$this->regex && !$this->getOption( 'settings' ) ) { @@ -121,7 +121,7 @@ class GetConfiguration extends Maintenance { # Filter out globals based on the regex if ( $this->regex ) { - $res = array(); + $res = []; foreach ( $GLOBALS as $name => $value ) { if ( preg_match( $this->regex, $name ) ) { $res[$name] = $value;