@@ -1961,7 +1961,6 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
1961
1961
if ($ expr ->name instanceof Expr) {
1962
1962
$ methodNameResult = $ this ->processExprNode ($ expr ->name , $ scope , $ nodeCallback , $ context ->enterDeep ());
1963
1963
$ throwPoints = array_merge ($ throwPoints , $ methodNameResult ->getThrowPoints ());
1964
- $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
1965
1964
$ scope = $ methodNameResult ->getScope ();
1966
1965
} else {
1967
1966
$ calledOnType = $ scope ->getType ($ expr ->var );
@@ -1977,8 +1976,6 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
1977
1976
if ($ methodThrowPoint !== null ) {
1978
1977
$ throwPoints [] = $ methodThrowPoint ;
1979
1978
}
1980
- } else {
1981
- $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
1982
1979
}
1983
1980
}
1984
1981
$ result = $ this ->processArgs ($ methodReflection , $ parametersAcceptor , $ expr ->args , $ scope , $ nodeCallback , $ context );
@@ -1991,6 +1988,8 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
1991
1988
$ scope = $ scope ->invalidateExpression ($ arg ->value , true );
1992
1989
}
1993
1990
}
1991
+ } else {
1992
+ $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
1994
1993
}
1995
1994
$ hasYield = $ hasYield || $ result ->hasYield ();
1996
1995
$ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
0 commit comments