@@ -45,10 +45,10 @@ public function getTagsByName(string $tagName): array
4545 /**
4646 * @return VarTagValueNode[]
4747 */
48- public function getVarTagValues (): array
48+ public function getVarTagValues (string $ tagName = ' @var ' ): array
4949 {
5050 return array_column (
51- array_filter ($ this ->getTagsByName (' @var ' ), static function (PhpDocTagNode $ tag ): bool {
51+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
5252 return $ tag ->value instanceof VarTagValueNode;
5353 }),
5454 'value '
@@ -59,10 +59,10 @@ public function getVarTagValues(): array
5959 /**
6060 * @return ParamTagValueNode[]
6161 */
62- public function getParamTagValues (): array
62+ public function getParamTagValues (string $ tagName = ' @param ' ): array
6363 {
6464 return array_column (
65- array_filter ($ this ->getTagsByName (' @param ' ), static function (PhpDocTagNode $ tag ): bool {
65+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
6666 return $ tag ->value instanceof ParamTagValueNode;
6767 }),
6868 'value '
@@ -73,10 +73,10 @@ public function getParamTagValues(): array
7373 /**
7474 * @return TemplateTagValueNode[]
7575 */
76- public function getTemplateTagValues (): array
76+ public function getTemplateTagValues (string $ tagName = ' @template ' ): array
7777 {
7878 return array_column (
79- array_filter ($ this ->getTagsByName (' @template ' ), static function (PhpDocTagNode $ tag ): bool {
79+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
8080 return $ tag ->value instanceof TemplateTagValueNode;
8181 }),
8282 'value '
@@ -87,10 +87,10 @@ public function getTemplateTagValues(): array
8787 /**
8888 * @return ExtendsTagValueNode[]
8989 */
90- public function getExtendsTagValues (): array
90+ public function getExtendsTagValues (string $ tagName = ' @extends ' ): array
9191 {
9292 return array_column (
93- array_filter ($ this ->getTagsByName (' @extends ' ), static function (PhpDocTagNode $ tag ): bool {
93+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
9494 return $ tag ->value instanceof ExtendsTagValueNode;
9595 }),
9696 'value '
@@ -101,10 +101,10 @@ public function getExtendsTagValues(): array
101101 /**
102102 * @return ImplementsTagValueNode[]
103103 */
104- public function getImplementsTagValues (): array
104+ public function getImplementsTagValues (string $ tagName = ' @implements ' ): array
105105 {
106106 return array_column (
107- array_filter ($ this ->getTagsByName (' @implements ' ), static function (PhpDocTagNode $ tag ): bool {
107+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
108108 return $ tag ->value instanceof ImplementsTagValueNode;
109109 }),
110110 'value '
@@ -115,10 +115,10 @@ public function getImplementsTagValues(): array
115115 /**
116116 * @return UsesTagValueNode[]
117117 */
118- public function getUsesTagValues (): array
118+ public function getUsesTagValues (string $ tagName = ' @uses ' ): array
119119 {
120120 return array_column (
121- array_filter ($ this ->getTagsByName (' @uses ' ), static function (PhpDocTagNode $ tag ): bool {
121+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
122122 return $ tag ->value instanceof UsesTagValueNode;
123123 }),
124124 'value '
@@ -129,10 +129,10 @@ public function getUsesTagValues(): array
129129 /**
130130 * @return ReturnTagValueNode[]
131131 */
132- public function getReturnTagValues (): array
132+ public function getReturnTagValues (string $ tagName = ' @return ' ): array
133133 {
134134 return array_column (
135- array_filter ($ this ->getTagsByName (' @return ' ), static function (PhpDocTagNode $ tag ): bool {
135+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
136136 return $ tag ->value instanceof ReturnTagValueNode;
137137 }),
138138 'value '
@@ -143,10 +143,10 @@ public function getReturnTagValues(): array
143143 /**
144144 * @return ThrowsTagValueNode[]
145145 */
146- public function getThrowsTagValues (): array
146+ public function getThrowsTagValues (string $ tagName = ' @throws ' ): array
147147 {
148148 return array_column (
149- array_filter ($ this ->getTagsByName (' @throws ' ), static function (PhpDocTagNode $ tag ): bool {
149+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
150150 return $ tag ->value instanceof ThrowsTagValueNode;
151151 }),
152152 'value '
@@ -171,10 +171,10 @@ public function getDeprecatedTagValues(): array
171171 /**
172172 * @return PropertyTagValueNode[]
173173 */
174- public function getPropertyTagValues (): array
174+ public function getPropertyTagValues (string $ tagName = ' @property ' ): array
175175 {
176176 return array_column (
177- array_filter ($ this ->getTagsByName (' @property ' ), static function (PhpDocTagNode $ tag ): bool {
177+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
178178 return $ tag ->value instanceof PropertyTagValueNode;
179179 }),
180180 'value '
@@ -185,10 +185,10 @@ public function getPropertyTagValues(): array
185185 /**
186186 * @return PropertyTagValueNode[]
187187 */
188- public function getPropertyReadTagValues (): array
188+ public function getPropertyReadTagValues (string $ tagName = ' @property-read ' ): array
189189 {
190190 return array_column (
191- array_filter ($ this ->getTagsByName (' @property-read ' ), static function (PhpDocTagNode $ tag ): bool {
191+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
192192 return $ tag ->value instanceof PropertyTagValueNode;
193193 }),
194194 'value '
@@ -199,10 +199,10 @@ public function getPropertyReadTagValues(): array
199199 /**
200200 * @return PropertyTagValueNode[]
201201 */
202- public function getPropertyWriteTagValues (): array
202+ public function getPropertyWriteTagValues (string $ tagName = ' @property-write ' ): array
203203 {
204204 return array_column (
205- array_filter ($ this ->getTagsByName (' @property-write ' ), static function (PhpDocTagNode $ tag ): bool {
205+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
206206 return $ tag ->value instanceof PropertyTagValueNode;
207207 }),
208208 'value '
@@ -213,10 +213,10 @@ public function getPropertyWriteTagValues(): array
213213 /**
214214 * @return MethodTagValueNode[]
215215 */
216- public function getMethodTagValues (): array
216+ public function getMethodTagValues (string $ tagName = ' @method ' ): array
217217 {
218218 return array_column (
219- array_filter ($ this ->getTagsByName (' @method ' ), static function (PhpDocTagNode $ tag ): bool {
219+ array_filter ($ this ->getTagsByName ($ tagName ), static function (PhpDocTagNode $ tag ): bool {
220220 return $ tag ->value instanceof MethodTagValueNode;
221221 }),
222222 'value '
0 commit comments