1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

handle the non-empty case for shuffle()

This commit is contained in:
hirokinoue 2022-04-28 23:07:43 +09:00
parent db565f1d32
commit 95b5e8cb56

View File

@ -186,9 +186,10 @@ function array_search($needle, array $haystack, bool $strict = false)
/**
* @psalm-template T
* @psalm-template TArray as array<T>
*
* @param T[] $array
* @param-out list<T> $array
* @param TArray $array
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
*/
function shuffle(array &$array): bool
{