1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00
This commit is contained in:
Daniil Gentili 2022-11-22 17:29:53 +01:00
parent d580181171
commit 1a9edc3179
2 changed files with 6 additions and 3 deletions

View File

@ -283,9 +283,13 @@ class ArrayFunctionArgumentsAnalyzer
if ($was_list) {
if ($arg_value_atomic_type instanceof TNonEmptyArray) {
$arg_value_atomic_type = Type::getNonEmptyListAtomic($arg_value_atomic_type->type_params[1]);
$arg_value_atomic_type = Type::getNonEmptyListAtomic(
$arg_value_atomic_type->type_params[1]
);
} else {
$arg_value_atomic_type = Type::getListAtomic($arg_value_atomic_type->type_params[1]);
$arg_value_atomic_type = Type::getListAtomic(
$arg_value_atomic_type->type_params[1]
);
}
}

View File

@ -16,7 +16,6 @@ use Psalm\Type\Atomic\TLiteralInt;
use Psalm\Type\Atomic\TLiteralString;
use Psalm\Type\Atomic\TNonEmptyArray;
use Psalm\Type\Union;
use UnexpectedValueException;
use function addslashes;
use function count;