Skip to content

Commit cffcd07

Browse files
authored
Also add eloquent template tags from base class (#1645)
1 parent 9c6380d commit cffcd07

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Alias.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,15 @@ public function getPhpDocTemplates($prefix = "\t\t")
488488
$reflection = new ReflectionClass($class);
489489
$traits = collect($reflection->getTraitNames());
490490

491+
$phpdoc = new DocBlock($reflection);
492+
$templates = $phpdoc->getTagsByName('template');
493+
/** @var DocBlock\Tag\TemplateTag $template */
494+
foreach ($templates as $template) {
495+
$template->setBound('static');
496+
$template->setDocBlock($templateDoc);
497+
$templateDoc->appendTag($template);
498+
}
499+
491500
foreach ($traits as $trait) {
492501
$phpdoc = new DocBlock(new ReflectionClass($trait));
493502
$templates = $phpdoc->getTagsByName('template');

0 commit comments

Comments
 (0)