1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 18:17:55 +01:00

Refactoring

This commit is contained in:
Daniil Gentili 2022-11-26 15:54:46 +01:00
parent 120ba1f64c
commit 0a20c10e00
2 changed files with 2 additions and 11 deletions

View File

@ -373,14 +373,6 @@ class FunctionCallReturnTypeFetcher
]); ]);
} }
if ($atomic_types['array'] instanceof TNonEmptyList) {
return new Union([
$atomic_types['array']->count !== null
? new TLiteralInt($atomic_types['array']->count)
: new TIntRange(1, null)
]);
}
if ($atomic_types['array'] instanceof TKeyedArray) { if ($atomic_types['array'] instanceof TKeyedArray) {
$min = 0; $min = 0;
$max = 0; $max = 0;

View File

@ -70,9 +70,8 @@ class ArrayColumnReturnTypeProvider implements FunctionReturnTypeProviderInterfa
} }
} }
$input_array_not_empty = $input_array instanceof TNonEmptyList || $input_array_not_empty = $input_array instanceof TNonEmptyArray ||
$input_array instanceof TNonEmptyArray || ($input_array instanceof TKeyedArray && $input_array->isNonEmpty());
$input_array instanceof TKeyedArray;
} }
$value_column_name = null; $value_column_name = null;