diff --git a/src/Psalm/Internal/Codebase/Methods.php b/src/Psalm/Internal/Codebase/Methods.php index bc9abe6572f..3d9f691f4df 100644 --- a/src/Psalm/Internal/Codebase/Methods.php +++ b/src/Psalm/Internal/Codebase/Methods.php @@ -368,7 +368,7 @@ public function getMethodParams( } } - $declaring_method_id = $this->getDeclaringMethodId($method_id); + $declaring_method_id = $this->getDeclaringMethodId($method_id, true); $callmap_id = $declaring_method_id ?? $method_id; @@ -424,7 +424,7 @@ public function getMethodParams( } if ($declaring_method_id) { - $storage = $this->getStorage($declaring_method_id); + $storage = $this->getStorage($declaring_method_id, true); $params = $storage->params; @@ -1088,7 +1088,7 @@ public function getCasedMethodId(MethodIdentifier $original_method_id): string public function getUserMethodStorage(MethodIdentifier $method_id): ?MethodStorage { - $declaring_method_id = $this->getDeclaringMethodId($method_id); + $declaring_method_id = $this->getDeclaringMethodId($method_id, true); if (!$declaring_method_id) { if (InternalCallMapHandler::inCallMap((string) $method_id)) { @@ -1098,7 +1098,7 @@ public function getUserMethodStorage(MethodIdentifier $method_id): ?MethodStorag throw new UnexpectedValueException('$storage should not be null for ' . $method_id); } - $storage = $this->getStorage($declaring_method_id); + $storage = $this->getStorage($declaring_method_id, true); if (!$storage->location) { return null;