File tree Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Expand file tree Collapse file tree 1 file changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -4253,22 +4253,15 @@ public static function extractExposedComment(array $comments): ?ExposedDocCommen
4253
4253
function parseDocComments(array $comments): array {
4254
4254
$tags = [];
4255
4255
foreach ($comments as $comment) {
4256
- if ($comment instanceof DocComment) {
4257
- $tags = array_merge($tags, parseDocComment($comment)) ;
4256
+ if (!( $comment instanceof DocComment) ) {
4257
+ continue ;
4258
4258
}
4259
- }
4260
-
4261
- return $tags;
4262
- }
4263
-
4264
- /** @return DocCommentTag[] */
4265
- function parseDocComment(DocComment $comment): array {
4266
- $commentText = substr($comment->getText(), 2, -2);
4267
- $tags = [];
4268
- foreach (explode("\n", $commentText) as $commentLine) {
4269
- $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))?$/';
4270
- if (preg_match($regex, trim($commentLine), $matches)) {
4271
- $tags[] = new DocCommentTag($matches[1], $matches[2] ?? null);
4259
+ $commentText = substr($comment->getText(), 2, -2);
4260
+ foreach (explode("\n", $commentText) as $commentLine) {
4261
+ $regex = '/^\*\s*@([a-z-]+)(?:\s+(.+))?$/';
4262
+ if (preg_match($regex, trim($commentLine), $matches)) {
4263
+ $tags[] = new DocCommentTag($matches[1], $matches[2] ?? null);
4264
+ }
4272
4265
}
4273
4266
}
4274
4267
You can’t perform that action at this time.
0 commit comments