1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Support @inherits and @extends keywords too

This commit is contained in:
Matthew Brown 2019-01-19 15:12:13 -05:00
parent 9c5ef33997
commit 44b51cdf8e

View File

@ -572,8 +572,17 @@ class CommentAnalyzer
}
}
if (isset($comments['specials']['template-extends'])) {
foreach ($comments['specials']['template-extends'] as $template_line) {
if (isset($comments['specials']['template-extends'])
|| isset($comments['specials']['inherits'])
|| isset($comments['specials']['extends'])
) {
$all_inheritance = array_merge(
$comments['specials']['template-extends'] ?: [],
$comments['specials']['inherits'] ?: [],
$comments['specials']['extends'] ?: []
);
foreach ($all_inheritance as $template_line) {
$info->template_extends[] = $template_line;
}
}