diff --git a/src/Illuminate/Collections/Enumerable.php b/src/Illuminate/Collections/Enumerable.php index c9fb24fa1fac..918f64758e66 100644 --- a/src/Illuminate/Collections/Enumerable.php +++ b/src/Illuminate/Collections/Enumerable.php @@ -338,11 +338,11 @@ public function whenNotEmpty(callable $callback, callable $default = null); * @template TUnlessReturnType * * @param bool $value - * @param (callable($this): TUnlessReturnType)|null $callback + * @param (callable($this): TUnlessReturnType) $callback * @param (callable($this): TUnlessReturnType)|null $default * @return $this|TUnlessReturnType */ - public function unless($value, ?callable $callback = null, ?callable $default = null); + public function unless($value, callable $callback, callable $default = null); /** * Apply the callback unless the collection is empty.