X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=8232d529470aa2a238181287dc903231c0b164ba;hb=669a21a925ca4b30f850905806c08dbd82ecf03d;hp=88776f4f41b480943288523c90048acde038c2bf;hpb=7cf98015746d96c371133451a4c5ff3c65faeef1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 88776f4f41..8232d52947 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -23,22 +23,28 @@ require_once __DIR__ . '/Maintenance.php'; -// @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix -global $optionsWithArgs; -// @codingStandardsIgnoreEnd +// phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix +global $optionsWithArgs, $optionsWithoutArgs; + if ( !isset( $optionsWithArgs ) ) { - $optionsWithArgs = array(); + $optionsWithArgs = []; +} +if ( !isset( $optionsWithoutArgs ) ) { + $optionsWithoutArgs = []; } class CommandLineInc extends Maintenance { public function __construct() { - // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix - global $optionsWithArgs; - // @codingStandardsIgnoreEnd + // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix + global $optionsWithArgs, $optionsWithoutArgs; + parent::__construct(); foreach ( $optionsWithArgs as $name ) { $this->addOption( $name, '', false, true ); } + foreach ( $optionsWithoutArgs as $name ) { + $this->addOption( $name, '', false, false ); + } } /** @@ -53,14 +59,13 @@ class CommandLineInc extends Maintenance { } public function execute() { - // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix + // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.wgPrefix global $args, $options; - // @codingStandardsIgnoreEnd + $args = $this->mArgs; $options = $this->mOptions; } } -$maintClass = 'CommandLineInc'; +$maintClass = CommandLineInc::class; require RUN_MAINTENANCE_IF_MAIN; -