mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 13:51:54 +01:00
add test case for uksort()
This commit is contained in:
parent
8c64bddf29
commit
139948e774
@ -687,15 +687,22 @@ class ArrayFunctionCallTest extends TestCase
|
||||
],
|
||||
'uksort' => [
|
||||
'<?php
|
||||
function foo (string $a, string $b): int {
|
||||
return $a <=> $b;
|
||||
}
|
||||
$array = ["b" => 1, "a" => 2];
|
||||
uksort(
|
||||
$array,
|
||||
function (string $a, string $b) {
|
||||
return $a <=> $b;
|
||||
}
|
||||
"foo"
|
||||
);
|
||||
$emptyArray = [];
|
||||
uksort(
|
||||
$emptyArray,
|
||||
"foo"
|
||||
);',
|
||||
'assertions' => [
|
||||
'$array' => 'array<string, int>',
|
||||
'$array' => 'non-empty-array<string, int>',
|
||||
'$emptyArray' => 'array<empty, empty>',
|
||||
],
|
||||
],
|
||||
'arrayMergeTKeyedArray' => [
|
||||
|
Loading…
x
Reference in New Issue
Block a user