From b5c63c296783bd067b14bad410dab2b87a1b7b3c Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 27 Mar 2024 14:12:16 +0100 Subject: [PATCH] Process ConstFetch --- src/Analyser/NodeScopeResolver.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Analyser/NodeScopeResolver.php b/src/Analyser/NodeScopeResolver.php index af4a71829a..c7f4cf2d31 100644 --- a/src/Analyser/NodeScopeResolver.php +++ b/src/Analyser/NodeScopeResolver.php @@ -3298,6 +3298,11 @@ static function (Node $node, Scope $scope) use ($nodeCallback): void { $hasYield = false; $throwPoints = []; $impurePoints = []; + } elseif ($expr instanceof ConstFetch) { + $hasYield = false; + $throwPoints = []; + $impurePoints = []; + $nodeCallback($expr->name, $scope); } else { $hasYield = false; $throwPoints = [];