File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed
Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ public function getArgs(): int {
8484 }
8585
8686 /**
87- * @return \Generator <int, Tag>
87+ * @return array <int, Tag>
8888 */
89- public function getParams (): \ Generator {
90- yield from $ this ->getDoc ()->getTags ()->getParams ();
89+ public function getParams (): array {
90+ return $ this ->getDoc ()->getTags ()->getParams ();
9191 }
9292
9393 /**
Original file line number Diff line number Diff line change @@ -63,14 +63,18 @@ public function all(): array {
6363 }
6464
6565 /**
66- * @return \Generator <int, Hook>
66+ * @return array <int, Hook>
6767 */
68- public function filter ( string $ search ): \Generator {
68+ public function filter ( string $ search ): array {
69+ $ hooks = [];
70+
6971 foreach ( $ this ->data as $ hook ) {
7072 if ( strpos ( $ hook ['name ' ], $ search ) !== false ) {
71- yield Hook::fromData ( $ hook );
73+ $ hooks [] = Hook::fromData ( $ hook );
7274 }
7375 }
76+
77+ return $ hooks ;
7478 }
7579
7680 /**
Original file line number Diff line number Diff line change @@ -42,14 +42,18 @@ public function all(): array {
4242 }
4343
4444 /**
45- * @return \Generator <int, Tag>
45+ * @return array <int, Tag>
4646 */
47- public function getParams (): \Generator {
47+ public function getParams (): array {
48+ $ params = [];
49+
4850 foreach ( $ this as $ tag ) {
4951 if ( $ tag ->getName () === 'param ' ) {
50- yield $ tag ;
52+ $ params [] = $ tag ;
5153 }
5254 }
55+
56+ return $ params ;
5357 }
5458
5559 /**
You can’t perform that action at this time.
0 commit comments