mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
Cleanup
This commit is contained in:
parent
a342a26f0d
commit
99bdc2faeb
@ -733,11 +733,11 @@ class SimpleAssertionReconciler extends Reconciler
|
|||||||
// Impossible
|
// Impossible
|
||||||
$existing_var_type->removeType('array');
|
$existing_var_type->removeType('array');
|
||||||
$redundant = false;
|
$redundant = false;
|
||||||
} elseif ($assertion->count === $prop_min_count) {
|
|
||||||
// Redundant
|
|
||||||
$redundant = true;
|
|
||||||
} elseif ($array_atomic_type->fallback_params === null) {
|
} elseif ($array_atomic_type->fallback_params === null) {
|
||||||
if ($assertion->count > $prop_max_count) {
|
if ($assertion->count === $prop_min_count) {
|
||||||
|
// Redundant
|
||||||
|
$redundant = true;
|
||||||
|
} elseif ($assertion->count > $prop_max_count) {
|
||||||
// Impossible
|
// Impossible
|
||||||
$existing_var_type->removeType('array');
|
$existing_var_type->removeType('array');
|
||||||
$redundant = false;
|
$redundant = false;
|
||||||
|
@ -463,7 +463,7 @@ abstract class Type
|
|||||||
return new TKeyedArray(
|
return new TKeyedArray(
|
||||||
[$of->setPossiblyUndefined(true)],
|
[$of->setPossiblyUndefined(true)],
|
||||||
null,
|
null,
|
||||||
[self::getInt(), $of],
|
[new Union([new TIntRange(0, null)]), $of],
|
||||||
true,
|
true,
|
||||||
$from_docblock
|
$from_docblock
|
||||||
);
|
);
|
||||||
@ -477,7 +477,7 @@ abstract class Type
|
|||||||
return new TKeyedArray(
|
return new TKeyedArray(
|
||||||
[$of->setPossiblyUndefined(false)],
|
[$of->setPossiblyUndefined(false)],
|
||||||
null,
|
null,
|
||||||
[self::getInt(), $of],
|
[new Union([new TIntRange(0, null)]), $of],
|
||||||
true,
|
true,
|
||||||
$from_docblock
|
$from_docblock
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user