@@ -886,6 +886,66 @@ public function testArrayFilterCallback(bool $checkExplicitMixed): void
886
886
$ this ->analyse ([__DIR__ . '/data/array_filter_callback.php ' ], $ errors );
887
887
}
888
888
889
+ public function testArrayAllCallback (): void
890
+ {
891
+ if (PHP_VERSION_ID < 80400 ) {
892
+ $ this ->markTestSkipped ('Test skipped on lower version than 8.4 (needs array_all function) ' );
893
+ }
894
+
895
+ $ this ->analyse ([__DIR__ . '/data/array_all.php ' ], [
896
+ [
897
+ 'Parameter #2 $callback of function array_all expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(string, int): bool given. ' ,
898
+ 22 ,
899
+ ],
900
+ [
901
+ 'Parameter #2 $callback of function array_all expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(string, int): bool given. ' ,
902
+ 30 ,
903
+ ],
904
+ [
905
+ 'Parameter #2 $callback of function array_all expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(int, string): ( \'bar \'| \'foo \') given. ' ,
906
+ 36 ,
907
+ ],
908
+ [
909
+ 'Parameter #2 $callback of function array_all expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
910
+ 52 ,
911
+ ],
912
+ [
913
+ 'Parameter #2 $callback of function array_all expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
914
+ 55 ,
915
+ ],
916
+ ]);
917
+ }
918
+
919
+ public function testArrayAnyCallback (): void
920
+ {
921
+ if (PHP_VERSION_ID < 80400 ) {
922
+ $ this ->markTestSkipped ('Test skipped on lower version than 8.4 (needs array_any function) ' );
923
+ }
924
+
925
+ $ this ->analyse ([__DIR__ . '/data/array_any.php ' ], [
926
+ [
927
+ 'Parameter #2 $callback of function array_any expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(string, int): bool given. ' ,
928
+ 22 ,
929
+ ],
930
+ [
931
+ 'Parameter #2 $callback of function array_any expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(string, int): bool given. ' ,
932
+ 30 ,
933
+ ],
934
+ [
935
+ 'Parameter #2 $callback of function array_any expects callable(1|2, \'bar \'| \'foo \'): bool, Closure(int, string): ( \'bar \'| \'foo \') given. ' ,
936
+ 36 ,
937
+ ],
938
+ [
939
+ 'Parameter #2 $callback of function array_any expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
940
+ 52 ,
941
+ ],
942
+ [
943
+ 'Parameter #2 $callback of function array_any expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
944
+ 55 ,
945
+ ],
946
+ ]);
947
+ }
948
+
889
949
public function testArrayFindCallback (): void
890
950
{
891
951
$ this ->analyse ([__DIR__ . '/data/array_find.php ' ], [
@@ -903,11 +963,11 @@ public function testArrayFindCallback(): void
903
963
],
904
964
[
905
965
'Parameter #2 $callback of function array_find expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
906
- 49 ,
966
+ 52 ,
907
967
],
908
968
[
909
969
'Parameter #2 $callback of function array_find expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
910
- 52 ,
970
+ 55 ,
911
971
],
912
972
]);
913
973
}
@@ -929,11 +989,11 @@ public function testArrayFindKeyCallback(): void
929
989
],
930
990
[
931
991
'Parameter #2 $callback of function array_find_key expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
932
- 49 ,
992
+ 52 ,
933
993
],
934
994
[
935
995
'Parameter #2 $callback of function array_find_key expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
936
- 52 ,
996
+ 55 ,
937
997
],
938
998
]);
939
999
}
0 commit comments