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 ) {
* 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;