Skip to content

Commit 661bf7b

Browse files
committed
feat: support more tag types
1 parent 554b544 commit 661bf7b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/Parser/DocBlockParser.php

+33
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
use Doctum\Parser\Node\DocBlockNode;
1717
use phpDocumentor\Reflection\DocBlock;
18+
use phpDocumentor\Reflection\DocBlock\Tags\Author;
19+
use phpDocumentor\Reflection\DocBlock\Tags\Covers;
20+
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
21+
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
1822
use phpDocumentor\Reflection\DocBlock\Tags\Param;
1923
use phpDocumentor\Reflection\DocBlock\Tags\PropertyRead;
2024
use phpDocumentor\Reflection\DocBlock\Tags\Property;
@@ -24,6 +28,10 @@
2428
use phpDocumentor\Reflection\DocBlock\Tags\Throws;
2529
use phpDocumentor\Reflection\DocBlock\Tags\Var_;
2630
use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag;
31+
use phpDocumentor\Reflection\DocBlock\Tags\Link;
32+
use phpDocumentor\Reflection\DocBlock\Tags\Since;
33+
use phpDocumentor\Reflection\DocBlock\Tags\Uses;
34+
use phpDocumentor\Reflection\DocBlock\Tags\Version;
2735
use phpDocumentor\Reflection\DocBlockFactory;
2836
use phpDocumentor\Reflection\Types\Context;
2937

@@ -116,6 +124,31 @@ protected function parseTag(DocBlock\Tag $tag)
116124
case InvalidTag::class:
117125
/** @var \phpDocumentor\Reflection\DocBlock\Tags\InvalidTag $tag */
118126
return $tag->__toString();
127+
case Deprecated::class:
128+
/** @var Deprecated $tag */
129+
return $tag->__toString();
130+
case Covers::class:
131+
/** @var Covers $tag */
132+
return $tag->__toString();
133+
case Author::class:
134+
/** @var Author $tag */
135+
return $tag->__toString();
136+
case Version::class:
137+
/** @var Version $tag */
138+
return $tag->__toString();
139+
case Link::class:
140+
/** @var Link $tag */
141+
return $tag->__toString();
142+
case Since::class:
143+
/** @var Since $tag */
144+
return $tag->__toString();
145+
case Uses::class:
146+
/** @var Uses $tag */
147+
return $tag->__toString();
148+
case Generic::class:
149+
//TODO: better handling
150+
/** @var Generic $tag */
151+
return $tag->__toString();
119152
default:
120153
return $tag->__toString();
121154
}

0 commit comments

Comments
 (0)