djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
402 stars 102 forks source link

ValidClassNameSniff should check also simple classes #140

Closed gmponos closed 5 years ago

gmponos commented 6 years ago

I believe that ValidClassNameSniff should also check simple classes (T_CLASS) and display an error if they have abstract interface, exception and trait

If I have some time I will work on it if someone else does not do this before me.

wickedOne commented 6 years ago

hi there @gmponos,

could you clarify your issue?

T_INTERFACE, T_TRAIT and T_ABSTRACT should catch the interface, trait and abstract classes.

if you mean that instances of

class FooInterface {
    // ...
}

should raise a warning: not sure whether i agree as that's more a coding issue than a code style violation...

djoos commented 5 years ago

Closing this one off for now - happy to revisit the discussion once @gmponos provides further clarification...

gmponos commented 5 years ago

if you mean that instances of

class FooInterface {    // ... }

should raise a warning: not sure whether i agree as that's more a coding issue than a code style violation...

That's what I meant..