From 7e8851b702bee8e6a2505828253af6e6cc534de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lajos=20M=C3=A9sz=C3=A1ros?= Date: Tue, 11 May 2021 08:33:26 +0200 Subject: [PATCH] Type fix for A::findIndex() --- src/A.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/A.php b/src/A.php index 5a95826..60c8558 100644 --- a/src/A.php +++ b/src/A.php @@ -280,7 +280,7 @@ public static function findLast(callable $fn, array $data) { } // A::findIndex(x => x.a === 10, [['a' => 8], ['a' => 10]]) -> 1 - public static function findIndex(callable $fn, array $data): int { + public static function findIndex(callable $fn, array $data): ?int { if (self::isEmpty($data)) { return null; }