mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 02:27:59 +01:00
Refactoring
This commit is contained in:
parent
864a76459e
commit
120ba1f64c
@ -522,18 +522,11 @@ class SimpleNegatedAssertionReconciler extends Reconciler
|
|||||||
$array_atomic_type = $existing_var_atomic_types['array'];
|
$array_atomic_type = $existing_var_atomic_types['array'];
|
||||||
$redundant = true;
|
$redundant = true;
|
||||||
|
|
||||||
if (($array_atomic_type instanceof TNonEmptyArray
|
if ($array_atomic_type instanceof TKeyedArray) {
|
||||||
|| $array_atomic_type instanceof TNonEmptyList)
|
if ($count !== null) {
|
||||||
&& ($count === null
|
$prop_max_count = $array_atomic_type->fallback_params === null
|
||||||
|| $array_atomic_type->count >= $count
|
? count($array_atomic_type->properties)
|
||||||
|| $array_atomic_type->min_count >= $count)
|
: INF;
|
||||||
) {
|
|
||||||
$redundant = false;
|
|
||||||
|
|
||||||
$existing_var_type->removeType('array');
|
|
||||||
} elseif ($array_atomic_type instanceof TKeyedArray) {
|
|
||||||
if ($array_atomic_type->fallback_params === null && $count !== null) {
|
|
||||||
$prop_max_count = count($array_atomic_type->properties);
|
|
||||||
$prop_min_count = 0;
|
$prop_min_count = 0;
|
||||||
foreach ($array_atomic_type->properties as $property_type) {
|
foreach ($array_atomic_type->properties as $property_type) {
|
||||||
if (!$property_type->possibly_undefined) {
|
if (!$property_type->possibly_undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user