1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 18:17:55 +01:00
This commit is contained in:
Daniil Gentili 2022-11-26 14:24:55 +01:00
parent d2e0d3170d
commit ab1a901838
2 changed files with 0 additions and 15 deletions

View File

@ -300,15 +300,6 @@ class ArrayFunctionArgumentsAnalyzer
array_unshift($properties, $arg_value_type);
$by_ref_type = new Union([$objectlike_list->setProperties($properties)]);
} elseif ($array_type instanceof TList) {
$by_ref_type = Type::combineUnionTypes(
$by_ref_type,
new Union(
[
Type::getNonEmptyListAtomic($arg_value_type),
]
)
);
} else {
$by_ref_type = Type::combineUnionTypes(
$by_ref_type,

View File

@ -238,9 +238,6 @@ class ArrayFetchAnalyzer
$array_value_type = Type::getMixed();
} elseif ($array_type instanceof TArray) {
$array_value_type = $array_type->type_params[1];
} elseif ($array_type instanceof TList) {
$array_value_type = $array_type->type_param;
} else {
$array_value_type = $array_type->getGenericValueType();
}
@ -266,8 +263,6 @@ class ArrayFetchAnalyzer
if ($array_type instanceof TArray) {
$const_array_key_type = $array_type->type_params[0];
} elseif ($array_type instanceof TList) {
$const_array_key_type = Type::getInt();
} else {
$const_array_key_type = $array_type->getGenericKeyType();
}
@ -634,7 +629,6 @@ class ArrayFetchAnalyzer
if ($type instanceof TArray
|| $type instanceof TKeyedArray
|| $type instanceof TList
|| $type instanceof TClassStringMap
) {
self::handleArrayAccessOnArray(