diff --git a/src/Ast/PhpDoc/PhpDocNode.php b/src/Ast/PhpDoc/PhpDocNode.php index 62912b6a..e4cdf573 100644 --- a/src/Ast/PhpDoc/PhpDocNode.php +++ b/src/Ast/PhpDoc/PhpDocNode.php @@ -84,6 +84,20 @@ public function getReturnTagValues(): array } + /** + * @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[] */