@@ -261,7 +261,7 @@ public function getArgs($tag, $tagContent, $phpDocInfo)
261
261
{
262
262
$ tagContent = trim ($ tagContent );
263
263
264
- $ removeEmptyKeys = function ($ class , ...$ extraData ) use ($ tagContent ) {
264
+ $ parseAndRemoveEmptyKeys = function ($ class , ...$ extraData ) use ($ tagContent ) {
265
265
$ parsed = (new $ class ($ tagContent , ...$ extraData ))->parse ();
266
266
$ arguments = [];
267
267
foreach ($ parsed as $ key => $ value ) {
@@ -275,19 +275,19 @@ public function getArgs($tag, $tagContent, $phpDocInfo)
275
275
276
276
return match (strtolower ($ tag )) {
277
277
'header ' => explode (' ' , $ tagContent ),
278
- 'urlparam ' => $ removeEmptyKeys (UrlParamTagParser::class),
279
- 'queryparam ' => $ removeEmptyKeys (QueryParamTagParser::class),
280
- 'bodyparam ' => $ removeEmptyKeys (BodyParamTagParser::class),
281
- 'responsefield ' => $ removeEmptyKeys (ResponseFieldTagParser::class),
278
+ 'urlparam ' => $ parseAndRemoveEmptyKeys (UrlParamTagParser::class),
279
+ 'queryparam ' => $ parseAndRemoveEmptyKeys (QueryParamTagParser::class),
280
+ 'bodyparam ' => $ parseAndRemoveEmptyKeys (BodyParamTagParser::class),
281
+ 'responsefield ' => $ parseAndRemoveEmptyKeys (ResponseFieldTagParser::class),
282
282
283
- 'response ' => $ removeEmptyKeys (ResponseTagParser::class),
284
- 'responsefile ' => $ removeEmptyKeys (ResponseFileTagParser::class),
285
- 'apiresource ' => $ removeEmptyKeys (ApiResourceTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
286
- 'apiresourcecollection ' => $ removeEmptyKeys (ApiResourceTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags (), true ),
287
- 'transformer ' => $ removeEmptyKeys (TransformerTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
288
- 'transformercollection ' => $ removeEmptyKeys (TransformerTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags (), true ),
283
+ 'response ' => $ parseAndRemoveEmptyKeys (ResponseTagParser::class),
284
+ 'responsefile ' => $ parseAndRemoveEmptyKeys (ResponseFileTagParser::class),
285
+ 'apiresource ' => $ parseAndRemoveEmptyKeys (ApiResourceTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
286
+ 'apiresourcecollection ' => $ parseAndRemoveEmptyKeys (ApiResourceTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags (), true ),
287
+ 'transformer ' => $ parseAndRemoveEmptyKeys (TransformerTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
288
+ 'transformercollection ' => $ parseAndRemoveEmptyKeys (TransformerTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags (), true ),
289
289
290
- 'subgroup ' => $ removeEmptyKeys (SubgroupTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
290
+ 'subgroup ' => $ parseAndRemoveEmptyKeys (SubgroupTagParser::class, $ phpDocInfo ->getPhpDocNode ()->getTags ()),
291
291
};
292
292
}
293
293
}
0 commit comments