Skip to content

Commit f7d0e43

Browse files
committed
Update NodeScopeResolver.php
1 parent 9f4d18d commit f7d0e43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,7 +3299,6 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
32993299
$classType = null;
33003300
$methodReflection = null;
33013301
$methodName = null;
3302-
$dynamicCall = false;
33033302
if ($expr->name instanceof Expr) {
33043303
$result = $this->processExprNode($stmt, $expr->name, $scope, $storage, $nodeCallback, $context->enterDeep());
33053304
$hasYield = $hasYield || $result->hasYield();
@@ -3312,7 +3311,6 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
33123311
} elseif ($expr->class instanceof Expr) {
33133312
$classType = TypeCombinator::removeNull($scope->getType($expr->class))->getObjectTypeOrClassStringObjectType();
33143313
$methodName = $expr->name->name;
3315-
$dynamicCall = true;
33163314
}
33173315

33183316
if ($classType !== null && $methodName !== null) {
@@ -3325,7 +3323,7 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
33253323
$methodReflection->getNamedArgumentsVariants(),
33263324
);
33273325

3328-
if (!$dynamicCall) {
3326+
if (!$expr->class instanceof Expr) {
33293327
$methodThrowPoint = $this->getStaticMethodThrowPoint($methodReflection, $parametersAcceptor, $expr, $scope);
33303328
if ($methodThrowPoint !== null) {
33313329
$throwPoints[] = $methodThrowPoint;

0 commit comments

Comments
 (0)