mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
Cleanup
This commit is contained in:
parent
e2da9c9dc4
commit
3f710a80af
@ -149,7 +149,6 @@ class ArrayTypeComparator
|
||||
|
||||
if ($container_type_part instanceof TKeyedArray) {
|
||||
if ($container_type_part->is_list) {
|
||||
/** @var TList|TNonEmptyList */
|
||||
$container_type_part = $container_type_part->isNonEmpty()
|
||||
? Type::getNonEmptyListAtomic($container_type_part->getGenericValueType())
|
||||
: Type::getListAtomic($container_type_part->getGenericValueType());
|
||||
|
@ -2247,8 +2247,10 @@ class SimpleAssertionReconciler extends Reconciler
|
||||
if ($type->isArrayAccessibleWithStringKey($codebase)) {
|
||||
if (get_class($type) === TArray::class) {
|
||||
$array_types[] = new TNonEmptyArray($type->type_params);
|
||||
} elseif (get_class($type) === TList::class) {
|
||||
$array_types[] = Type::getNonEmptyListAtomic($type->type_param);
|
||||
} elseif ($type instanceof TKeyedArray && $type->is_list) {
|
||||
$properties = $type->properties;
|
||||
$properties[0] = $properties[0]->setPossiblyUndefined(false);
|
||||
$array_types[] = $type->setProperties($properties);
|
||||
} else {
|
||||
$array_types[] = $type;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user