Merge "Follow up to 'Remove support for the deprecated Key header'"
[lhc/web/wiklou.git] / includes / libs / StatusValue.php
index 6f348c2..71a0e34 100644 (file)
@@ -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;