From 3de4457a45ef799a233088996a1481ce31e064e9 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Wed, 6 Feb 2019 19:39:49 +0000 Subject: [PATCH] adding type-hinting stub for array_chunk() --- src/Psalm/Internal/Stubs/CoreGenericFunctions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Psalm/Internal/Stubs/CoreGenericFunctions.php b/src/Psalm/Internal/Stubs/CoreGenericFunctions.php index 61f9c53e4..258f2850d 100644 --- a/src/Psalm/Internal/Stubs/CoreGenericFunctions.php +++ b/src/Psalm/Internal/Stubs/CoreGenericFunctions.php @@ -146,3 +146,11 @@ function usort(array &$arr, callable $callback): bool {} */ function array_change_key_case(array $arr, int $case = CASE_LOWER) {} +/** + * @psalm-template T + * + * @param array $arr + * + * @return array> + */ +function array_chunk(array $arr, int $size, bool $preserve_keys = false) {}