I'd like to exclude specific exceptions from the Squiz.Commenting.FunctionCommentThrowTag sniff.
With this rule configuraion:
<rule ref="Squiz.Commenting.FunctionCommentThrowTag">
<properties>
<property name="excludedExceptions" type="array" value="\MyNamespace\NeverThrownException"/>
</properties>
</rule>
The following should be valid:
class SomeClass
{
/**
* @return \DateTime
*/
function someMethod()
{
try {
return new \DateTime();
} catch (\Exception $e) {
throw new \MyNamespace\NeverThrownException(1611660216231, $e);
}
}
}