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; }