mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
parent
064d4886c3
commit
50df2868f2
@ -45,13 +45,12 @@ function array_unique(array $arr, int $sort_flags = 0)
|
||||
*
|
||||
* @param array<TKey, TValue> $arr
|
||||
* @param array $arr2
|
||||
* @param array|null $arr3
|
||||
* @param array|null $arr4
|
||||
* @param array ...$arr3
|
||||
*
|
||||
* @return array<TKey, TValue>
|
||||
* @psalm-pure
|
||||
*/
|
||||
function array_intersect(array $arr, array $arr2, array $arr3 = null, array $arr4 = null)
|
||||
function array_intersect(array $arr, array $arr2, array ...$arr3)
|
||||
{
|
||||
}
|
||||
|
||||
@ -61,13 +60,12 @@ function array_intersect(array $arr, array $arr2, array $arr3 = null, array $arr
|
||||
*
|
||||
* @param array<TKey, TValue> $arr
|
||||
* @param array $arr2
|
||||
* @param array|null $arr3
|
||||
* @param array|null $arr4
|
||||
* @param array ...$arr3
|
||||
*
|
||||
* @return array<TKey, TValue>
|
||||
* @psalm-pure
|
||||
*/
|
||||
function array_intersect_key(array $arr, array $arr2, array $arr3 = null, array $arr4 = null)
|
||||
function array_intersect_key(array $arr, array $arr2, array ...$arr3)
|
||||
{
|
||||
}
|
||||
|
||||
@ -92,13 +90,12 @@ function array_combine(array $arr, array $arr2)
|
||||
*
|
||||
* @param array<TKey, TValue> $arr
|
||||
* @param array $arr2
|
||||
* @param array|null $arr3
|
||||
* @param array|null $arr4
|
||||
* @param array ...$arr3
|
||||
*
|
||||
* @return array<TKey, TValue>
|
||||
* @psalm-pure
|
||||
*/
|
||||
function array_diff(array $arr, array $arr2, array $arr3 = null, array $arr4 = null)
|
||||
function array_diff(array $arr, array $arr2, array ...$arr3)
|
||||
{
|
||||
}
|
||||
|
||||
@ -108,13 +105,12 @@ function array_diff(array $arr, array $arr2, array $arr3 = null, array $arr4 = n
|
||||
*
|
||||
* @param array<TKey, TValue> $arr
|
||||
* @param array $arr2
|
||||
* @param array|null $arr3
|
||||
* @param array|null $arr4
|
||||
* @param array ...$arr3
|
||||
*
|
||||
* @return array<TKey, TValue>
|
||||
* @psalm-pure
|
||||
*/
|
||||
function array_diff_key(array $arr, array $arr2, array $arr3 = null, array $arr4 = null)
|
||||
function array_diff_key(array $arr, array $arr2, array ...$arr3)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -266,6 +266,16 @@ class FunctionCallTest extends TestCase
|
||||
'$d' => 'array<string, int>',
|
||||
],
|
||||
],
|
||||
'arrayDiffIsVariadic' => [
|
||||
'<?php
|
||||
array_diff([], [], [], [], []);',
|
||||
'assertions' => [],
|
||||
],
|
||||
'arrayDiffKeyIsVariadic' => [
|
||||
'<?php
|
||||
array_diff_key([], [], [], [], []);',
|
||||
'assertions' => [],
|
||||
],
|
||||
'arrayPopMixed' => [
|
||||
'<?php
|
||||
/** @var mixed */
|
||||
@ -1032,6 +1042,16 @@ class FunctionCallTest extends TestCase
|
||||
'$bar' => 'array<int, int>',
|
||||
],
|
||||
],
|
||||
'arrayIntersectIsVariadic' => [
|
||||
'<?php
|
||||
array_intersect([], [], [], [], []);',
|
||||
'assertions' => [],
|
||||
],
|
||||
'arrayIntersectKeyIsVariadic' => [
|
||||
'<?php
|
||||
array_intersect_key([], [], [], [], []);',
|
||||
'assertions' => [],
|
||||
],
|
||||
'arrayReduce' => [
|
||||
'<?php
|
||||
$arr = [2, 3, 4, 5];
|
||||
|
Loading…
Reference in New Issue
Block a user