From dc271fe25c23648a006270ecd2b21178f6aebb86 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Thu, 2 Dec 2021 04:51:06 +0200 Subject: [PATCH] Consider emptiness for array_count_values() Fixes vimeo/psalm#7044 --- stubs/CoreGenericFunctions.phpstub | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index ca73f6857d5..2ef9243d907 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -1084,10 +1084,11 @@ function str_getcsv(string $string, string $separator = ',', string $enclosure = /** * @template TKey as array-key + * @template TArray as array * - * @param array $array + * @param TArray $array * - * @return array + * @return (TArray is non-empty-array ? non-empty-array : array) * * @psalm-pure */