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(newImplement('Throwable'))
// also doesn't work with ->that(newExtend(\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)
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
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:
Expected behavior
The text was updated successfully, but these errors were encountered: