Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6d590c8

Browse files
committed
update php doc parse helper
1 parent 78a1b31 commit 6d590c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎libs/php-utils/src/PhpDoc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ class PhpDoc
2525
* - 'allow' // only allowed tags
2626
* - 'ignore' // ignored tags
2727
* - 'default' => 'description', // default tag name, first line text will attach to it.
28+
* @param array $defaults
2829
* @return array The parsed tags
2930
*/
30-
public static function getTags(string $comment, array $options = []): array
31+
public static function getTags(string $comment, array $options = [], array$defaults = []): array
3132
{
3233
if (!$comment = \trim($comment, "/ \n")) {
3334
return [];
@@ -74,7 +75,7 @@ public static function getTags(string $comment, array $options = []): array
7475
}
7576
}
7677

77-
return $tags;
78+
return $defaults ? \array_merge($defaults, $tags) :$tags;
7879
}
7980

8081
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /