mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
return null when expression can't be stored as unresolved
This commit is contained in:
parent
e7a86148b0
commit
da4a0fe9a9
@ -203,6 +203,10 @@ class ExpressionResolver
|
||||
$parent_fq_class_name
|
||||
);
|
||||
|
||||
if (!$right) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new UnresolvedConstant\UnresolvedAdditionOp(
|
||||
new UnresolvedConstant\ScalarValue(0),
|
||||
$right
|
||||
@ -217,6 +221,10 @@ class ExpressionResolver
|
||||
$parent_fq_class_name
|
||||
);
|
||||
|
||||
if (!$right) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new UnresolvedConstant\UnresolvedSubtractionOp(
|
||||
new UnresolvedConstant\ScalarValue(0),
|
||||
$right
|
||||
|
Loading…
x
Reference in New Issue
Block a user