You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to check if all my exceptions are suffixed by Exception keyword
Current behavior
All interfaces and traits seems to be flagged as violation
How to reproduce
Create this rule:
$rules[] = Rule::allClasses()
->that(newImplement(\Throwable::class))
// also doesn't work with ->that(new Implement('Throwable'))// also doesn't work with ->that(new Extend(\Exception::class))
->should(newHaveNameMatching('*Exception'))
->because('reasons');
Expected behavior
The exceptions not suffixing Exception should be flagged as violations (that's not the case)
All interfaces and traits should not be flagged as violations (because they don't event extend Throwable in my case)