@@ -4774,8 +4774,7 @@ private function exactInstantiation(New_ $node, string $className): ?Type
47744774		);
47754775	}
47764776
4777- 	/** @api */ 
4778- 	public  function  getMethodReflection (Type $ typeWithMethodstring  $ methodNameExtendedMethodReflection 
4777+ 	private  function  filterTypeWithMethod (Type $ typeWithMethodstring  $ methodNameType 
47794778	{
47804779		if  ($ typeWithMethodinstanceof  UnionType) {
47814780			$ newTypes
@@ -4796,19 +4795,31 @@ public function getMethodReflection(Type $typeWithMethod, string $methodName): ?
47964795			return  null ;
47974796		}
47984797
4799- 		return  $ typeWithMethodgetMethod ($ methodName$ this 
4798+ 		return  $ typeWithMethod
4799+ 	}
4800+ 
4801+ 	/** @api */ 
4802+ 	public  function  getMethodReflection (Type $ typeWithMethodstring  $ methodNameExtendedMethodReflection 
4803+ 	{
4804+ 		$ type$ this filterTypeWithMethod ($ typeWithMethod$ methodName
4805+ 		if  ($ typenull ) {
4806+ 			return  null ;
4807+ 		}
4808+ 
4809+ 		return  $ typegetMethod ($ methodName$ this 
48004810	}
48014811
48024812	/** 
48034813	 * @param MethodCall|Node\Expr\StaticCall $methodCall 
48044814	 */ 
48054815	private  function  methodCallReturnType (Type $ typeWithMethodstring  $ methodNameExpr $ methodCallType 
48064816	{
4807- 		$ methodReflection $ this getMethodReflection ($ typeWithMethod$ methodName
4808- 		if  ($ methodReflection null ) {
4817+ 		$ typeWithMethod $ this filterTypeWithMethod ($ typeWithMethod$ methodName
4818+ 		if  ($ typeWithMethod null ) {
48094819			return  null ;
48104820		}
48114821
4822+ 		$ methodReflection$ typeWithMethodgetMethod ($ methodName$ this 
48124823		$ parametersAcceptorselectFromArgs (
48134824			$ this 
48144825			$ methodCallgetArgs (),
0 commit comments