Skip to content

Commit f353a50

Browse files
committed
Update NodeScopeResolver.php
1 parent ba1b7f9 commit f353a50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4768,7 +4768,8 @@ private function getFunctionThrowPoint(
47684768
private function getMethodThrowPoint(MethodReflection $methodReflection, ParametersAcceptor $parametersAcceptor, MethodCall $methodCall, MutatingScope $scope): ?InternalThrowPoint
47694769
{
47704770
if (
4771-
in_array($methodReflection->getName(), ['invoke', 'invokeArgs'], true)
4771+
$this->implicitThrows
4772+
&& in_array($methodReflection->getName(), ['invoke', 'invokeArgs'], true)
47724773
&& in_array($methodReflection->getDeclaringClass()->getName(), [ReflectionMethod::class, ReflectionFunction::class], true)
47734774
) {
47744775
return InternalThrowPoint::createImplicit($scope, $methodCall);

0 commit comments

Comments
 (0)