Skip to content

Commit 110cbfa

Browse files
authored
[Reflection] Allow New_ on ReflectionResolver::resolveFunctionLikeReflectionFromCall() (#7508)
1 parent 6bb202c commit 110cbfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Reflection/ReflectionResolver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function resolveMethodReflectionFromMethodCall(MethodCall $methodCall): ?
191191
}
192192

193193
public function resolveFunctionLikeReflectionFromCall(
194-
MethodCall|FuncCall|StaticCall $call
194+
MethodCall|FuncCall|StaticCall|New_ $call
195195
): MethodReflection | FunctionReflection | null {
196196
if ($call instanceof MethodCall) {
197197
return $this->resolveMethodReflectionFromMethodCall($call);
@@ -201,6 +201,10 @@ public function resolveFunctionLikeReflectionFromCall(
201201
return $this->resolveMethodReflectionFromStaticCall($call);
202202
}
203203

204+
if ($call instanceof New_) {
205+
return $this->resolveMethodReflectionFromNew($call);
206+
}
207+
204208
return $this->resolveFunctionReflectionFromFuncCall($call);
205209
}
206210

0 commit comments

Comments
 (0)