From 43b8a36cb64028b18b69ad239acbc1b1e9139d99 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 9 Jan 2026 07:17:52 +0100 Subject: [PATCH] Revert "MutatingScope resolvedTypes is an array of ExpressionTypeHolder" This reverts commit 1ad06f56bb639471a413e54c373148eb1152cd46. --- src/Analyser/MutatingScope.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 4bbd20b34f..f437f0f589 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -179,7 +179,7 @@ class MutatingScope implements Scope, NodeCallbackInvoker private const KEEP_VOID_ATTRIBUTE_NAME = 'keepVoid'; private const CONTAINS_SUPER_GLOBAL_ATTRIBUTE_NAME = 'containsSuperGlobal'; - /** @var array */ + /** @var Type[] */ private array $resolvedTypes = []; /** @var array */ @@ -872,9 +872,9 @@ public function getType(Expr $node): Type $key = $this->getNodeKey($node); if (!array_key_exists($key, $this->resolvedTypes)) { - $this->resolvedTypes[$key] = ExpressionTypeHolder::createYes($node, TypeUtils::resolveLateResolvableTypes($this->resolveType($key, $node))); + $this->resolvedTypes[$key] = TypeUtils::resolveLateResolvableTypes($this->resolveType($key, $node)); } - return $this->resolvedTypes[$key]->getType(); + return $this->resolvedTypes[$key]; } public function getScopeType(Expr $expr): Type