*/
// Bail on old versions of PHP, or if composer has not been run yet to install
-// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
-// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
-require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php';
-// @codingStandardsIgnoreEnd
+// dependencies.
+require_once __DIR__ . '/../includes/PHPVersionCheck.php';
wfEntryPointCheck( 'cli' );
/**
if ( isset( $this->mParams[$option] ) ) {
$multi = $this->mParams[$option]['multiOccurrence'];
- $exists = array_key_exists( $option, $options );
- if ( $multi && $exists ) {
- $options[$option][] = $value;
- } elseif ( $multi ) {
- $options[$option] = [ $value ];
- } elseif ( !$exists ) {
- $options[$option] = $value;
- } else {
- $this->error( "\nERROR: $option parameter given twice\n" );
- $this->maybeHelp( true );
- }
+ } else {
+ $multi = false;
+ }
+ $exists = array_key_exists( $option, $options );
+ if ( $multi && $exists ) {
+ $options[$option][] = $value;
+ } elseif ( $multi ) {
+ $options[$option] = [ $value ];
+ } elseif ( !$exists ) {
+ $options[$option] = $value;
+ } else {
+ $this->error( "\nERROR: $option parameter given twice\n" );
+ $this->maybeHelp( true );
}
}