Skip to content

Commit 37bf36d

Browse files
committed
handle the non-empty case for uasort()
1 parent c7b9e1e commit 37bf36d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

stubs/CoreGenericFunctions.phpstub

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,11 @@ function usort(array &$array, callable $callback): bool
231231
/**
232232
* @psalm-template TKey
233233
* @psalm-template T
234+
* @psalm-template TArray as array<TKey,T>
234235
*
235-
* @param array<TKey,T> $array
236+
* @param TArray $array
236237
* @param callable(T,T):int $callback
237-
* @param-out array<TKey,T> $array
238+
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
238239
*/
239240
function uasort(array &$array, callable $callback): bool
240241
{

0 commit comments

Comments
 (0)