diff --git a/src/Alias.php b/src/Alias.php index 599b39615..9103a5875 100644 --- a/src/Alias.php +++ b/src/Alias.php @@ -488,6 +488,15 @@ public function getPhpDocTemplates($prefix = "\t\t") $reflection = new ReflectionClass($class); $traits = collect($reflection->getTraitNames()); + $phpdoc = new DocBlock($reflection); + $templates = $phpdoc->getTagsByName('template'); + /** @var DocBlock\Tag\TemplateTag $template */ + foreach ($templates as $template) { + $template->setBound('static'); + $template->setDocBlock($templateDoc); + $templateDoc->appendTag($template); + } + foreach ($traits as $trait) { $phpdoc = new DocBlock(new ReflectionClass($trait)); $templates = $phpdoc->getTagsByName('template');