Skip to content

Commit 34a1fcf

Browse files
committed
Update NodeScopeResolver.php
1 parent 79bb916 commit 34a1fcf

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎src/Analyser/NodeScopeResolver.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,7 +3344,6 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
33443344
$classType = null;
33453345
$methodReflection = null;
33463346
$methodName = null;
3347-
$dynamicCall = false;
33483347
if ($expr->name instanceof Expr) {
33493348
$result = $this->processExprNode($stmt, $expr->name, $scope, $storage, $nodeCallback, $context->enterDeep());
33503349
$hasYield = $hasYield || $result->hasYield();
@@ -3357,7 +3356,6 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
33573356
} elseif ($expr->class instanceof Expr) {
33583357
$classType = TypeCombinator::removeNull($scope->getType($expr->class))->getObjectTypeOrClassStringObjectType();
33593358
$methodName = $expr->name->name;
3360-
$dynamicCall = true;
33613359
}
33623360

33633361
if ($classType !== null && $methodName !== null) {
@@ -3370,7 +3368,7 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
33703368
$methodReflection->getNamedArgumentsVariants(),
33713369
);
33723370

3373-
if (!$dynamicCall) {
3371+
if (!$expr->class instanceof Expr) {
33743372
$methodThrowPoint = $this->getStaticMethodThrowPoint($methodReflection, $parametersAcceptor, $expr, $scope);
33753373
if ($methodThrowPoint !== null) {
33763374
$throwPoints[] = $methodThrowPoint;

0 commit comments

Comments
 (0)