@@ -886,6 +886,66 @@ public function testArrayFilterCallback(bool $checkExplicitMixed): void
886886 $ this ->analyse ([__DIR__ . '/data/array_filter_callback.php ' ], $ errors );
887887 }
888888
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+
889949 public function testArrayFindCallback (): void
890950 {
891951 $ this ->analyse ([__DIR__ . '/data/array_find.php ' ], [
@@ -903,11 +963,11 @@ public function testArrayFindCallback(): void
903963 ],
904964 [
905965 'Parameter #2 $callback of function array_find expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
906- 49 ,
966+ 52 ,
907967 ],
908968 [
909969 'Parameter #2 $callback of function array_find expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
910- 52 ,
970+ 55 ,
911971 ],
912972 ]);
913973 }
@@ -929,11 +989,11 @@ public function testArrayFindKeyCallback(): void
929989 ],
930990 [
931991 'Parameter #2 $callback of function array_find_key expects callable(mixed, int|string): bool, Closure(string, array): false given. ' ,
932- 49 ,
992+ 52 ,
933993 ],
934994 [
935995 'Parameter #2 $callback of function array_find_key expects callable(mixed, int|string): bool, Closure(string, int): array{} given. ' ,
936- 52 ,
996+ 55 ,
937997 ],
938998 ]);
939999 }
0 commit comments