Skip to content

Commit abc8cd8

Browse files
committed
Fix
1 parent 3c44a2e commit abc8cd8

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
@@ -5110,13 +5110,16 @@ private function processArgs(
51105110

51115111
if ($parameter instanceof ExtendedParameterReflection
51125112
&& $parameter->isPureUnlessCallableIsImpureParameter()
5113+
&& $parameterType !== null
51135114
&& $parameterType->isTrue()->yes()
51145115
) {
5115-
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0) {
5116+
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0 && $calleeReflection !== null) {
51165117
$parameterCallable = $parameterType->getCallableParametersAcceptors($scope)[0];
51175118
$certain = $parameterCallable->isPure()->yes();
51185119
if ($certain) {
5119-
$impurePoints[] = new SimpleImpurePoint(
5120+
$impurePoints[] = new ImpurePoint(
5121+
$scope,
5122+
$callLike,
51205123
'functionCall',
51215124
sprintf('call to function %s()', $calleeReflection->getName()),
51225125
$certain,

0 commit comments

Comments
 (0)