// Get the options and update stats
if ( $option ) {
if ( !array_key_exists( $option, $defaultOptions ) ) {
- $this->error( "Invalid user option. Use --list to see valid choices\n", 1 );
+ $this->fatalError( "Invalid user option. Use --list to see valid choices\n" );
}
$userValue = $user->getOption( $option );
if ( $userValue <> $defaultOptions[$option] ) {
- // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
- @$ret[$option][$userValue]++;
- // @codingStandardsIgnoreEnd
+ $ret[$option][$userValue] = ( $ret[$option][$userValue] ?? 0 ) + 1;
}
} else {
-
foreach ( $defaultOptions as $name => $defaultValue ) {
$userValue = $user->getOption( $name );
if ( $userValue != $defaultValue ) {
- // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
- @$ret[$name][$userValue]++;
- // @codingStandardsIgnoreEnd
+ $ret[$name][$userValue] = ( $ret[$name][$userValue] ?? 0 ) + 1;
}
}
}
}
}
-$maintClass = 'UserOptionsMaintenance';
+$maintClass = UserOptionsMaintenance::class;
require RUN_MAINTENANCE_IF_MAIN;