Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / maintenance / userOptions.php
index 7cf16b6..2f8941f 100644 (file)
@@ -102,23 +102,18 @@ The new option is NOT validated.' );
                        // 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;
                                        }
                                }
                        }
@@ -201,5 +196,5 @@ WARN
        }
 }
 
-$maintClass = 'UserOptionsMaintenance';
+$maintClass = UserOptionsMaintenance::class;
 require RUN_MAINTENANCE_IF_MAIN;