Feature Request
| Q |
A |
| New Feature |
yes |
| RFC |
no |
| BC Break |
no |
Summary
We want to be sure, no one throws a general Exception in functions:
$rules[] = Rule::allClasses()
->that(new ResideInOneOfTheseNamespaces('App'))
->should(new NotContainDocBlockLike('@throws Exception'))
->because('we don\'t want simple exceptions - use custom instead');
The rule also matches the case below, which is not useful:
/**
* @throws ExceptionInterface
*/
public function doStuff(): void
{
doSomething();
}
The violation:
Xxx has 1 violations
should not have a doc block that contains @throws Exception because we don't want simple exceptions - use custom instead
Is there any possibility to use a regex?
Feature Request
Summary
We want to be sure, no one throws a general Exception in functions:
The rule also matches the case below, which is not useful:
The violation:
Is there any possibility to use a regex?