diff --git a/stubs/CoreGenericFunctions.phpstub b/stubs/CoreGenericFunctions.phpstub index ee92d6a6d..fba4729af 100644 --- a/stubs/CoreGenericFunctions.phpstub +++ b/stubs/CoreGenericFunctions.phpstub @@ -66,7 +66,7 @@ function array_intersect_assoc(array $arr, array $arr2, array ...$arr3) * @param array $arr * @param array $arr2 * - * @return array|false + * @return ($arr is non-empty-array ? non-empty-array|false : array|false) * @psalm-ignore-falsable-return * @psalm-pure */ diff --git a/tests/ArrayFunctionCallTest.php b/tests/ArrayFunctionCallTest.php index d3e5c6e59..fe6726c14 100644 --- a/tests/ArrayFunctionCallTest.php +++ b/tests/ArrayFunctionCallTest.php @@ -157,14 +157,14 @@ class ArrayFunctionCallTest extends TestCase ' [ - '$c' => 'array|false', + '$c' => 'false|non-empty-array', ], ], 'arrayCombineFalse' => [ ' [ - '$c' => 'array|false', + '$c' => 'false|non-empty-array', ], ], 'arrayMergeIntArrays' => [