@@ -942,7 +942,7 @@ private function resolveType(string $exprString, Expr $node): Type
942
942
if ($ this ->getBooleanExpressionDepth ($ node ->left ) <= self ::BOOLEAN_EXPRESSION_MAX_PROCESS_DEPTH ) {
943
943
$ noopCallback = static function (): void {
944
944
};
945
- $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep (), StatementContext:: createTopLevel () );
945
+ $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
946
946
$ rightBooleanType = $ leftResult ->getTruthyScope ()->getType ($ node ->right )->toBoolean ();
947
947
} else {
948
948
$ rightBooleanType = $ this ->filterByTruthyValue ($ node ->left )->getType ($ node ->right )->toBoolean ();
@@ -974,7 +974,7 @@ private function resolveType(string $exprString, Expr $node): Type
974
974
if ($ this ->getBooleanExpressionDepth ($ node ->left ) <= self ::BOOLEAN_EXPRESSION_MAX_PROCESS_DEPTH ) {
975
975
$ noopCallback = static function (): void {
976
976
};
977
- $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep (), StatementContext:: createTopLevel () );
977
+ $ leftResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->left ), $ node ->left , $ this , $ noopCallback , ExpressionContext::createDeep ());
978
978
$ rightBooleanType = $ leftResult ->getFalseyScope ()->getType ($ node ->right )->toBoolean ();
979
979
} else {
980
980
$ rightBooleanType = $ this ->filterByFalseyValue ($ node ->left )->getType ($ node ->right )->toBoolean ();
@@ -1408,7 +1408,6 @@ static function (Node $node, Scope $scope) use ($arrowScope, &$arrowFunctionImpu
1408
1408
);
1409
1409
},
1410
1410
ExpressionContext::createDeep (),
1411
- StatementContext::createTopLevel (),
1412
1411
);
1413
1412
$ throwPoints = $ arrowFunctionExprResult ->getThrowPoints ();
1414
1413
$ impurePoints = array_merge ($ arrowFunctionImpurePoints , $ arrowFunctionExprResult ->getImpurePoints ());
@@ -2060,7 +2059,7 @@ static function (Node $node, Scope $scope) use ($arrowScope, &$arrowFunctionImpu
2060
2059
if ($ node instanceof Expr \Ternary) {
2061
2060
$ noopCallback = static function (): void {
2062
2061
};
2063
- $ condResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->cond ), $ node ->cond , $ this , $ noopCallback , ExpressionContext::createDeep (), StatementContext:: createTopLevel () );
2062
+ $ condResult = $ this ->nodeScopeResolver ->processExprNode (new Node \Stmt \Expression ($ node ->cond ), $ node ->cond , $ this , $ noopCallback , ExpressionContext::createDeep ());
2064
2063
if ($ node ->if === null ) {
2065
2064
$ conditionType = $ this ->getType ($ node ->cond );
2066
2065
$ booleanConditionType = $ conditionType ->toBoolean ();
0 commit comments