From 2b34b1228b3473912286139174fe3749204db77e Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:36:28 +0900 Subject: [PATCH] handle the non-empty case for usort() --- stubs/CoreGenericFunctions.phpstub | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index 32bd501a20c..a1fe41a66d1 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -219,10 +219,11 @@ function rsort(array &$array, int $flags = SORT_REGULAR): bool /** * @psalm-template T + * @psalm-template TArray as array * - * @param T[] $array + * @param TArray $array * @param callable(T,T):int $callback - * @param-out list $array + * @param-out (TArray is non-empty-array ? non-empty-list : list) $array */ function usort(array &$array, callable $callback): bool {