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 0af5cba

Browse files
rvanvelzenondrejmirtes
authored andcommitted
Also expose the tags
1 parent 8f703ba commit 0af5cba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎src/Ast/PhpDoc/PhpDocNode.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,20 @@ static function (PhpDocTagValueNode $value): bool {
272272
}
273273

274274

275+
/**
276+
* @return AssertTagValueNode[]
277+
*/
278+
public function getAssertTagValues(string $tagName = '@phpstan-assert'): array
279+
{
280+
return array_filter(
281+
array_column($this->getTagsByName($tagName), 'value'),
282+
static function (PhpDocTagValueNode $value): bool {
283+
return $value instanceof AssertTagValueNode;
284+
}
285+
);
286+
}
287+
288+
275289
public function __toString(): string
276290
{
277291
$children = array_map(

0 commit comments

Comments
(0)

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