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