mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
fix positive-numeric assertion
This commit is contained in:
parent
6d059b9c8f
commit
def7d31566
@ -3769,7 +3769,7 @@ class AssertionFinder
|
||||
if ($var_name !== null) {
|
||||
if ($superior_value_position === self::ASSIGNMENT_TO_RIGHT) {
|
||||
if ($superior_value_comparison === 0) {
|
||||
$if_types[$var_name] = [['positive-numeric', '=int(0)']];
|
||||
$if_types[$var_name] = [['=positive-numeric', '=int(0)']];
|
||||
} elseif ($superior_value_comparison === 1) {
|
||||
$if_types[$var_name] = [['positive-numeric']];
|
||||
} else {
|
||||
@ -3883,7 +3883,7 @@ class AssertionFinder
|
||||
$if_types[$var_name] = [['<' . $inferior_value_comparison]];
|
||||
} else {
|
||||
if ($inferior_value_comparison === 0) {
|
||||
$if_types[$var_name] = [['positive-numeric', '=int(0)']];
|
||||
$if_types[$var_name] = [['=positive-numeric', '=int(0)']];
|
||||
} elseif ($inferior_value_comparison === 1) {
|
||||
$if_types[$var_name] = [['positive-numeric']];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user