// @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
global $optionsWithArgs;
+global $optionsWithoutArgs;
// @codingStandardsIgnoreEnd
if ( !isset( $optionsWithArgs ) ) {
- $optionsWithArgs = array();
+ $optionsWithArgs = [];
+}
+if ( !isset( $optionsWithoutArgs ) ) {
+ $optionsWithoutArgs = [];
}
class CommandLineInc extends Maintenance {
public function __construct() {
// @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
- global $optionsWithArgs;
+ global $optionsWithArgs, $optionsWithoutArgs;
// @codingStandardsIgnoreEnd
parent::__construct();
foreach ( $optionsWithArgs as $name ) {
$this->addOption( $name, '', false, true );
}
+ foreach ( $optionsWithoutArgs as $name ) {
+ $this->addOption( $name, '', false, false );
+ }
}
/**