diff --git a/src/Reflection/ReflectionResolver.php b/src/Reflection/ReflectionResolver.php index 9ec329c1086..c2c98d67f60 100644 --- a/src/Reflection/ReflectionResolver.php +++ b/src/Reflection/ReflectionResolver.php @@ -191,7 +191,7 @@ public function resolveMethodReflectionFromMethodCall(MethodCall $methodCall): ? } public function resolveFunctionLikeReflectionFromCall( - MethodCall|FuncCall|StaticCall $call + MethodCall|FuncCall|StaticCall|New_ $call ): MethodReflection | FunctionReflection | null { if ($call instanceof MethodCall) { return $this->resolveMethodReflectionFromMethodCall($call); @@ -201,6 +201,10 @@ public function resolveFunctionLikeReflectionFromCall( return $this->resolveMethodReflectionFromStaticCall($call); } + if ($call instanceof New_) { + return $this->resolveMethodReflectionFromNew($call); + } + return $this->resolveFunctionReflectionFromFuncCall($call); }