@@ -792,7 +792,7 @@ private function resolveType(string $exprString, Expr $node): Type
792
792
if ($ this ->getBooleanExpressionDepth ($ node ->left ) <= self ::BOOLEAN_EXPRESSION_MAX_PROCESS_DEPTH ) {
793
793
$ noopCallback = static function (): void {
794
794
};
795
- $ leftResult = $ this ->nodeScopeResolver ->processExprNode ($ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
795
+ $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \ Stmt \ Expression ( $ node -> left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
796
796
$ rightBooleanType = $ leftResult ->getTruthyScope ()->getType ($ node ->right )->toBoolean ();
797
797
} else {
798
798
$ rightBooleanType = $ this ->filterByTruthyValue ($ node ->left )->getType ($ node ->right )->toBoolean ();
@@ -824,7 +824,7 @@ private function resolveType(string $exprString, Expr $node): Type
824
824
if ($ this ->getBooleanExpressionDepth ($ node ->left ) <= self ::BOOLEAN_EXPRESSION_MAX_PROCESS_DEPTH ) {
825
825
$ noopCallback = static function (): void {
826
826
};
827
- $ leftResult = $ this ->nodeScopeResolver ->processExprNode ($ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
827
+ $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \ Stmt \ Expression ( $ node -> left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
828
828
$ rightBooleanType = $ leftResult ->getFalseyScope ()->getType ($ node ->right )->toBoolean ();
829
829
} else {
830
830
$ rightBooleanType = $ this ->filterByFalseyValue ($ node ->left )->getType ($ node ->right )->toBoolean ();
@@ -1655,7 +1655,7 @@ private function resolveType(string $exprString, Expr $node): Type
1655
1655
if ($ node instanceof Expr \Ternary) {
1656
1656
$ noopCallback = static function (): void {
1657
1657
};
1658
- $ condResult = $ this ->nodeScopeResolver ->processExprNode ($ node ->cond , $ this , $ noopCallback , ExpressionContext::createDeep ());
1658
+ $ condResult = $ this ->nodeScopeResolver ->processExprNode (new Node \ Stmt \ Expression ( $ node -> cond ), $ node ->cond , $ this , $ noopCallback , ExpressionContext::createDeep ());
1659
1659
if ($ node ->if === null ) {
1660
1660
$ conditionType = $ this ->getType ($ node ->cond );
1661
1661
$ booleanConditionType = $ conditionType ->toBoolean ();
0 commit comments