Skip to content

Commit

Permalink
[10.x] Turn Enumerable unless() $callback parameter optional (#51701)
Browse files Browse the repository at this point in the history
* turn Enumerable unless()  parameter optional

* nullable parameters declaration
  • Loading branch information
faissaloux authored Jun 4, 2024
1 parent 8154eb6 commit 6de257e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Collections/Enumerable.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ public function whenNotEmpty(callable $callback, callable $default = null);
* @template TUnlessReturnType
*
* @param bool $value
* @param (callable($this): TUnlessReturnType) $callback
* @param (callable($this): TUnlessReturnType)|null $callback
* @param (callable($this): TUnlessReturnType)|null $default
* @return $this|TUnlessReturnType
*/
public function unless($value, callable $callback, callable $default = null);
public function unless($value, ?callable $callback = null, ?callable $default = null);

/**
* Apply the callback unless the collection is empty.
Expand Down

0 comments on commit 6de257e

Please sign in to comment.