File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ public function getArgs(): int {
8383 return $ this ->args ;
8484 }
8585
86+ /**
87+ * @return \Generator<int, Tag>
88+ */
89+ public function getParams (): \Generator {
90+ yield from $ this ->getDoc ()->getTags ()->getParams ();
91+ }
92+
8693 /**
8794 * @phpstan-param HookArray $data
8895 */
Original file line number Diff line number Diff line change @@ -38,7 +38,18 @@ public function getIterator(): \Traversable {
3838 * @return array<int, Tag>
3939 */
4040 public function all (): array {
41- return $ this ->tags ;
41+ return iterator_to_array ( $ this );
42+ }
43+
44+ /**
45+ * @return \Generator<int, Tag>
46+ */
47+ public function getParams (): \Generator {
48+ foreach ( $ this as $ tag ) {
49+ if ( $ tag ->getName () === 'param ' ) {
50+ yield $ tag ;
51+ }
52+ }
4253 }
4354
4455 /**
You can’t perform that action at this time.
0 commit comments