mirror of
https://github.com/danog/phpdoc-parser.git
synced 2025-01-22 13:51:20 +01:00
PhpDocNode: add getThrowsTagValues() (#12)
This commit is contained in:
parent
aa22c2f688
commit
850b167f07
@ -84,6 +84,20 @@ class PhpDocNode implements Node
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return ThrowsTagValueNode[]
|
||||
*/
|
||||
public function getThrowsTagValues(): array
|
||||
{
|
||||
return array_column(
|
||||
array_filter($this->getTagsByName('@throws'), function (PhpDocTagNode $tag): bool {
|
||||
return $tag->value instanceof ThrowsTagValueNode;
|
||||
}),
|
||||
'value'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return PropertyTagValueNode[]
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user