X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2FStatusValue.php;h=71a0e348dde88cac7e5d15c6dae1fe40b8309a85;hb=445699efbd88a02719f9f7c3ac2d1859b035df67;hp=6f348c2b96e6f4e101bdd242b764a3df2ac804a1;hpb=ef470ebf7f7716c2c1a20960d642a1d898231f6a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php index 6f348c2b96..71a0e348dd 100644 --- a/includes/libs/StatusValue.php +++ b/includes/libs/StatusValue.php @@ -68,14 +68,14 @@ class StatusValue { public static function newFatal( $message /*, parameters...*/ ) { $params = func_get_args(); $result = new static(); - call_user_func_array( [ &$result, 'fatal' ], $params ); + $result->fatal( ...$params ); return $result; } /** * Factory function for good results * - * @param mixed $value + * @param mixed|null $value * @return static */ public static function newGood( $value = null ) { @@ -107,7 +107,7 @@ class StatusValue { } else { $errorsOnlyStatusValue->errors[] = $item; } - }; + } return [ $errorsOnlyStatusValue, $warningsOnlyStatusValue ]; } @@ -162,7 +162,7 @@ class StatusValue { * Change operation result * * @param bool $ok Whether the operation completed - * @param mixed $value + * @param mixed|null $value */ public function setResult( $ok, $value = null ) { $this->ok = (bool)$ok;