Skip to content

Commit

Permalink
Type fix for A::findIndex()
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed May 11, 2021
1 parent 3a806c6 commit 7e8851b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/A.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e8851b

Please sign in to comment.