Skip to content

Commit adb02ca

Browse files
committed
Fix
1 parent 1cc1fad commit adb02ca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4603,13 +4603,16 @@ private function processArgs(
46034603

46044604
if ($parameter instanceof ExtendedParameterReflection
46054605
&& $parameter->isPureUnlessCallableIsImpureParameter()
4606+
&& $parameterType !== null
46064607
&& $parameterType->isTrue()->yes()
46074608
) {
4608-
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0) {
4609+
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0 && $calleeReflection !== null) {
46094610
$parameterCallable = $parameterType->getCallableParametersAcceptors($scope)[0];
46104611
$certain = $parameterCallable->isPure()->yes();
46114612
if ($certain) {
4612-
$impurePoints[] = new SimpleImpurePoint(
4613+
$impurePoints[] = new ImpurePoint(
4614+
$scope,
4615+
$callLike,
46134616
'functionCall',
46144617
sprintf('call to function %s()', $calleeReflection->getName()),
46154618
$certain,

0 commit comments

Comments
 (0)