Skip to content
Draft
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
zonuexe committed Aug 1, 2025
commit 853e5bf5fe81af5a06bbf6027b67f1cfe42d1d96
7 changes: 5 additions & 2 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5110,13 +5110,16 @@ private function processArgs(

if ($parameter instanceof ExtendedParameterReflection
&& $parameter->isPureUnlessCallableIsImpureParameter()
&& $parameterType !== null
&& $parameterType->isTrue()->yes()
) {
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0) {
if (count($parameterType->getCallableParametersAcceptors($scope)) > 0 && $calleeReflection !== null) {
$parameterCallable = $parameterType->getCallableParametersAcceptors($scope)[0];
$certain = $parameterCallable->isPure()->yes();
if ($certain) {
$impurePoints[] = new SimpleImpurePoint(
$impurePoints[] = new ImpurePoint(
$scope,
$callLike,
'functionCall',
sprintf('call to function %s()', $calleeReflection->getName()),
$certain,
Expand Down