2828use PHPStan \Type \ObjectType ;
2929use PHPStan \Type \Type ;
3030use PHPStan \Type \TypeTraverser ;
31- use PHPStan \Type \TypeUtils ;
3231use PHPStan \Type \TypeWithClassName ;
3332use PHPStan \Type \UnionType ;
3433use PHPStan \Type \VerbosityLevel ;
@@ -428,7 +427,7 @@ private function determineContext(Scope $scope, Expr $node): TypeSpecifierContex
428427 if ($ this ->reflectionProvider ->hasFunction ($ node ->name , $ scope )) {
429428 $ functionReflection = $ this ->reflectionProvider ->getFunction ($ node ->name , $ scope );
430429 $ parametersAcceptor = ParametersAcceptorSelector::selectFromArgs ($ scope , $ node ->getArgs (), $ functionReflection ->getVariants (), $ functionReflection ->getNamedArgumentsVariants ());
431- $ returnType = TypeUtils:: resolveLateResolvableTypes ( $ parametersAcceptor ->getReturnType () );
430+ $ returnType = $ parametersAcceptor ->getReturnType ();
432431
433432 return $ returnType ->isVoid ()->yes () ? TypeSpecifierContext::createNull () : TypeSpecifierContext::createTruthy ();
434433 }
@@ -437,7 +436,7 @@ private function determineContext(Scope $scope, Expr $node): TypeSpecifierContex
437436 $ methodReflection = $ scope ->getMethodReflection ($ methodCalledOnType , $ node ->name ->name );
438437 if ($ methodReflection !== null ) {
439438 $ parametersAcceptor = ParametersAcceptorSelector::selectFromArgs ($ scope , $ node ->getArgs (), $ methodReflection ->getVariants (), $ methodReflection ->getNamedArgumentsVariants ());
440- $ returnType = TypeUtils:: resolveLateResolvableTypes ( $ parametersAcceptor ->getReturnType () );
439+ $ returnType = $ parametersAcceptor ->getReturnType ();
441440
442441 return $ returnType ->isVoid ()->yes () ? TypeSpecifierContext::createNull () : TypeSpecifierContext::createTruthy ();
443442 }
@@ -451,7 +450,7 @@ private function determineContext(Scope $scope, Expr $node): TypeSpecifierContex
451450 $ staticMethodReflection = $ scope ->getMethodReflection ($ calleeType , $ node ->name ->name );
452451 if ($ staticMethodReflection !== null ) {
453452 $ parametersAcceptor = ParametersAcceptorSelector::selectFromArgs ($ scope , $ node ->getArgs (), $ staticMethodReflection ->getVariants (), $ staticMethodReflection ->getNamedArgumentsVariants ());
454- $ returnType = TypeUtils:: resolveLateResolvableTypes ( $ parametersAcceptor ->getReturnType () );
453+ $ returnType = $ parametersAcceptor ->getReturnType ();
455454
456455 return $ returnType ->isVoid ()->yes () ? TypeSpecifierContext::createNull () : TypeSpecifierContext::createTruthy ();
457456 }
0 commit comments