mirror of
https://github.com/danog/psalm.git
synced 2024-12-03 18:17:55 +01:00
Refactoring
This commit is contained in:
parent
120ba1f64c
commit
0a20c10e00
@ -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) {
|
||||
$min = 0;
|
||||
$max = 0;
|
||||
|
@ -70,9 +70,8 @@ class ArrayColumnReturnTypeProvider implements FunctionReturnTypeProviderInterfa
|
||||
}
|
||||
}
|
||||
|
||||
$input_array_not_empty = $input_array instanceof TNonEmptyList ||
|
||||
$input_array instanceof TNonEmptyArray ||
|
||||
$input_array instanceof TKeyedArray;
|
||||
$input_array_not_empty = $input_array instanceof TNonEmptyArray ||
|
||||
($input_array instanceof TKeyedArray && $input_array->isNonEmpty());
|
||||
}
|
||||
|
||||
$value_column_name = null;
|
||||
|
Loading…
Reference in New Issue
Block a user