From 95b5e8cb564c16c0e472f46f4682721f9a3f5500 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Thu, 28 Apr 2022 23:07:43 +0900 Subject: [PATCH] handle the non-empty case for shuffle() --- stubs/CoreGenericFunctions.phpstub | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 4d67c2f7a6d..5993fbedbb7 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -186,9 +186,10 @@ function array_search($needle, array $haystack, bool $strict = false) /** * @psalm-template T + * @psalm-template TArray as array * - * @param T[] $array - * @param-out list $array + * @param TArray $array + * @param-out (TArray is non-empty-array ? non-empty-list : list) $array */ function shuffle(array &$array): bool {