mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Don’t override local docblocks when inheritdoc is present
This commit is contained in:
parent
bf13ff2e7d
commit
11dc78fd76
@ -192,7 +192,15 @@ class Methods
|
||||
if ($method_id = $this->getDeclaringMethodId($method_id)) {
|
||||
$storage = $this->getStorage($method_id);
|
||||
|
||||
if (!$storage->inheritdoc) {
|
||||
if ($storage->inheritdoc) {
|
||||
$non_null_param_types = array_filter(
|
||||
$storage->params,
|
||||
/** @return bool */
|
||||
function (FunctionLikeParameter $p) {
|
||||
return $p->type !== null && $p->type->from_docblock;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$non_null_param_types = array_filter(
|
||||
$storage->params,
|
||||
/** @return bool */
|
||||
@ -200,8 +208,6 @@ class Methods
|
||||
return $p->type !== null;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$non_null_param_types = false;
|
||||
}
|
||||
|
||||
$params = $storage->params;
|
||||
|
Loading…
Reference in New Issue
Block a user