mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
replace +/- by >/<
This commit is contained in:
parent
5f764b9d8f
commit
2a9ddab738
@ -3730,7 +3730,7 @@ class AssertionFinder
|
||||
}
|
||||
|
||||
if ($var_name) {
|
||||
$if_types[$var_name] = [['=isset'], ['+' . $superior_value_comparison]];
|
||||
$if_types[$var_name] = [['=isset'], ['>' . $superior_value_comparison]];
|
||||
}
|
||||
|
||||
return $if_types ? [$if_types] : [];
|
||||
@ -3937,7 +3937,7 @@ class AssertionFinder
|
||||
}
|
||||
|
||||
if ($var_name) {
|
||||
$if_types[$var_name] = [['=isset'], ['-' . $inferior_value_comparison]];
|
||||
$if_types[$var_name] = [['=isset'], ['<' . $inferior_value_comparison]];
|
||||
}
|
||||
|
||||
return $if_types ? [$if_types] : [];
|
||||
|
@ -102,14 +102,14 @@ class SimpleAssertionReconciler extends \Psalm\Type\Reconciler
|
||||
);
|
||||
}
|
||||
|
||||
if ($assertion[0] === '+') {
|
||||
if ($assertion[0] === '>') {
|
||||
return self::reconcileSuperiorTo(
|
||||
$existing_var_type,
|
||||
substr($assertion, 1)
|
||||
);
|
||||
}
|
||||
|
||||
if ($assertion[0] === '-') {
|
||||
if ($assertion[0] === '<') {
|
||||
return self::reconcileInferiorTo(
|
||||
$existing_var_type,
|
||||
substr($assertion, 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user