Skip to content

Commit 2b34b12

Browse files
committed
handle the non-empty case for usort()
1 parent 139948e commit 2b34b12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stubs/CoreGenericFunctions.phpstub

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,11 @@ function rsort(array &$array, int $flags = SORT_REGULAR): bool
219219

220220
/**
221221
* @psalm-template T
222+
* @psalm-template TArray as array<T>
222223
*
223-
* @param T[] $array
224+
* @param TArray $array
224225
* @param callable(T,T):int $callback
225-
* @param-out list<T> $array
226+
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
226227
*/
227228
function usort(array &$array, callable $callback): bool
228229
{

0 commit comments

Comments
 (0)