diff --git a/tests/PHPStan/Rules/Functions/data/array_map.php b/tests/PHPStan/Rules/Functions/data/array_map.php index b92567f6d51..90d804bbd4f 100644 --- a/tests/PHPStan/Rules/Functions/data/array_map.php +++ b/tests/PHPStan/Rules/Functions/data/array_map.php @@ -1,6 +1,8 @@ '', + function(stdClass $in): string { + return ''; + }, [1, 2, 3] ); diff --git a/tests/PHPStan/Rules/Functions/data/array_reduce.php b/tests/PHPStan/Rules/Functions/data/array_reduce.php index 2857029bd31..eb7588e9cc9 100644 --- a/tests/PHPStan/Rules/Functions/data/array_reduce.php +++ b/tests/PHPStan/Rules/Functions/data/array_reduce.php @@ -2,18 +2,24 @@ array_reduce( [1,2,3], - fn(string $foo, string $current): string => $foo . $current, + function(string $foo, string $current): string { + return $foo . $current; + }, '' ); array_reduce( [1,2,3], - fn(string $foo, int $current): string => $foo . $current, + function(string $foo, int $current): string { + return $foo . $current; + }, null ); array_reduce( [1,2,3], - fn(string $foo, int $current): string => $foo . $current, + function(string $foo, int $current): string { + return $foo . $current; + }, ); diff --git a/tests/PHPStan/Rules/Functions/data/array_walk.php b/tests/PHPStan/Rules/Functions/data/array_walk.php index 89a07d4c89b..f8ad25b3fff 100644 --- a/tests/PHPStan/Rules/Functions/data/array_walk.php +++ b/tests/PHPStan/Rules/Functions/data/array_walk.php @@ -3,12 +3,16 @@ $array = ['foo' => 1, 'bar' => 2]; array_walk( $array, - fn(stdClass $in, float $key) => '' + function(stdClass $in, float $key): string { + return ''; + } ); $array = ['foo' => 1, 'bar' => 2]; array_walk( $array, - fn(int $in, string $key, int $extra) => '', + function(int $in, string $key, int $extra): string { + return ''; + }, 'extra' );