PhpDocNode: add getThrowsTagValues() (#12)

This commit is contained in:
Josef Kříž 2018-05-10 11:23:09 +02:00 committed by Jan Tvrdík
parent aa22c2f688
commit 850b167f07

View File

@ -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[]
*/