From 4dd06f72964eb9098df92356895673d9f836a7d7 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 15 Jan 2024 13:07:06 +0100 Subject: [PATCH] Revert #10361 --- .../PhpVisitor/Reflector/ClassLikeNodeScanner.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php b/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php index bc0f61bb169..21ab7445e88 100644 --- a/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php +++ b/src/Psalm/Internal/PhpVisitor/Reflector/ClassLikeNodeScanner.php @@ -632,16 +632,11 @@ public function start(PhpParser\Node\Stmt\ClassLike $node): ?bool $storage->pseudo_static_methods[$lc_method_name] = $pseudo_method_storage; } else { $storage->pseudo_methods[$lc_method_name] = $pseudo_method_storage; + $storage->declaring_pseudo_method_ids[$lc_method_name] = new MethodIdentifier( + $fq_classlike_name, + $lc_method_name, + ); } - $method_identifier = new MethodIdentifier( - $fq_classlike_name, - $lc_method_name, - ); - $storage->inheritable_method_ids[$lc_method_name] = $method_identifier; - if (!isset($storage->overridden_method_ids[$lc_method_name])) { - $storage->overridden_method_ids[$lc_method_name] = []; - } - $storage->declaring_pseudo_method_ids[$lc_method_name] = $method_identifier; }