Skip to content

Commit

Permalink
Update nullables
Browse files Browse the repository at this point in the history
  • Loading branch information
cerbero90 committed Nov 22, 2024
1 parent 84544f7 commit fa8046c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/CasesCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ public function toArray(): array
/**
* Retrieve the first case.
*
* @param (callable(TValue, array-key): bool)|null $callback
* @param ?callable(TValue, array-key): bool $callback
* @return ?TValue
*/
public function first(callable|null $callback = null): mixed
public function first(?callable $callback = null): mixed
{
$callback ??= fn() => true;

Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/CollectsCases.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public static function count(): int
/**
* Retrieve the first case.
*
* @param (callable(self, array-key): bool)|null $callback
* @param ?callable(self, array-key): bool $callback
*/
public static function first(callable|null $callback = null): ?self
public static function first(?callable $callback = null): ?self
{
return self::collect()->first($callback);
}
Expand Down

0 comments on commit fa8046c

Please sign in to comment.