Skip to content

Commit 4d71fc0

Browse files
committed
fix: Add getTags method to retrieve tags by name
1 parent 5e1d059 commit 4d71fc0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/Reflection/DocBlock.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ public function hasTag($name)
2727
return $this->reflection->hasTag($name);
2828
}
2929

30+
public function getTags($name)
31+
{
32+
/**
33+
* @var array $tags
34+
*/
35+
$tags = $this->reflection->getTagsByName($name);
36+
37+
if (empty($tags)) {
38+
return null;
39+
}
40+
41+
return $tags;
42+
}
43+
3044
/**
3145
* @param $name
3246
*

0 commit comments

Comments
 (0)