Skip to content

Commit

Permalink
[phpstorm-stubs] use dedicated Template type for template PHPDoc tags
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Nov 10, 2024
1 parent 57fe546 commit 11b7ed7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Model/PHPDocElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use phpDocumentor\Reflection\DocBlock\Tags\Return_;
use phpDocumentor\Reflection\DocBlock\Tags\See;
use phpDocumentor\Reflection\DocBlock\Tags\Since;
use phpDocumentor\Reflection\DocBlock\Tags\Template;
use phpDocumentor\Reflection\DocBlock\Tags\Var_;
use PhpParser\Node;
use StubTests\Model\Tags\RemovedTag;
Expand Down Expand Up @@ -103,7 +104,7 @@ protected function collectTags(Node $node)
$this->hasInheritDocTag = $phpDoc->hasTag('inheritdoc') || $phpDoc->hasTag('inheritDoc') ||
stripos($phpDoc->getSummary(), 'inheritdoc') > 0;
$this->templateTypes += array_map(
function (Generic $tag) {
function (Template $tag) {
return preg_split("/\W/", $tag->getDescription()->getBodyTemplate())[0];
},
$phpDoc->getTagsByName('template')
Expand Down

0 comments on commit 11b7ed7

Please sign in to comment.