1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Use the same docblock as the source params, if possible

This commit is contained in:
Matt Brown 2020-11-12 09:14:40 -05:00 committed by Daniil Gentili
parent bd20313a14
commit 5d24b351dc
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -740,6 +740,20 @@ class Methods
$candidate_type = null;
if (isset($class_storage->documenting_method_ids[$appearing_method_name])) {
$overridden_method_id = $class_storage->documenting_method_ids[$appearing_method_name];
$overridden_storage = $this->getStorage($overridden_method_id);
if ($overridden_storage->return_type) {
if ($overridden_storage->return_type->isNull()) {
return Type::getVoid();
}
return clone $overridden_storage->return_type;
}
}
foreach ($class_storage->overridden_method_ids[$appearing_method_name] as $overridden_method_id) {
$overridden_storage = $this->getStorage($overridden_method_id);