@@ -153,24 +153,22 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex
153153 $ scope = $ argsResult ->getScope ();
154154
155155 if ($ methodReflection !== null ) {
156- if ($ parametersAcceptor !== null ) {
157- $ methodThrowPoint = $ this ->getMethodThrowPoint ($ methodReflection , $ parametersAcceptor , $ expr , $ scope );
158- if ($ methodThrowPoint !== null ) {
159- $ throwPoints [] = $ methodThrowPoint ;
160- }
156+ $ methodThrowPoint = $ this ->getMethodThrowPoint ($ methodReflection , $ parametersAcceptor , $ expr , $ scope );
157+ if ($ methodThrowPoint !== null ) {
158+ $ throwPoints [] = $ methodThrowPoint ;
161159 }
162160
163161 if ($ methodReflection ->getName () === '__construct ' || $ methodReflection ->hasSideEffects ()->yes ()) {
164162 $ nodeScopeResolver ->callNodeCallback ($ nodeCallback , new InvalidateExprNode ($ normalizedExpr ->var ), $ scope , $ storage );
165163 $ scope = $ scope ->invalidateExpression ($ normalizedExpr ->var , true , $ methodReflection ->getDeclaringClass ());
166- } elseif ($ this ->rememberPossiblyImpureFunctionValues && $ methodReflection ->hasSideEffects ()->maybe () && !$ methodReflection ->getDeclaringClass ()->isBuiltin () && $ parametersAcceptor !== null ) {
164+ } elseif ($ this ->rememberPossiblyImpureFunctionValues && $ methodReflection ->hasSideEffects ()->maybe () && !$ methodReflection ->getDeclaringClass ()->isBuiltin ()) {
167165 $ scope = $ scope ->assignExpression (
168166 new PossiblyImpureCallExpr ($ normalizedExpr , $ normalizedExpr ->var , sprintf ('%s::%s() ' , $ methodReflection ->getDeclaringClass ()->getDisplayName (), $ methodReflection ->getName ())),
169167 $ parametersAcceptor ->getReturnType (),
170168 new MixedType (),
171169 );
172170 }
173- if ($ parametersAcceptor !== null && !$ methodReflection ->isStatic ()) {
171+ if (!$ methodReflection ->isStatic ()) {
174172 $ selfOutType = $ methodReflection ->getSelfOutType ();
175173 if ($ selfOutType !== null ) {
176174 $ scope = $ scope ->assignExpression (
0 commit comments