From fa8046c8bb776ab43c152e821a1337bab3fa086a Mon Sep 17 00:00:00 2001 From: Andrea Marco Sartori Date: Fri, 22 Nov 2024 17:22:14 +0100 Subject: [PATCH] Update nullables --- src/CasesCollection.php | 4 ++-- src/Concerns/CollectsCases.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CasesCollection.php b/src/CasesCollection.php index c74686c..a7a0e28 100644 --- a/src/CasesCollection.php +++ b/src/CasesCollection.php @@ -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; diff --git a/src/Concerns/CollectsCases.php b/src/Concerns/CollectsCases.php index 8e1e9aa..9944313 100644 --- a/src/Concerns/CollectsCases.php +++ b/src/Concerns/CollectsCases.php @@ -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); }