// 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
+ // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
@$ret[$option][$userValue]++;
- // @codingStandardsIgnoreEnd
}
} else {
foreach ( $defaultOptions as $name => $defaultValue ) {
$userValue = $user->getOption( $name );
if ( $userValue != $defaultValue ) {
- // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
+ // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
@$ret[$name][$userValue]++;
- // @codingStandardsIgnoreEnd
}
}
}
}
}
-$maintClass = 'UserOptionsMaintenance';
+$maintClass = UserOptionsMaintenance::class;
require RUN_MAINTENANCE_IF_MAIN;