Problem/Motivation

The coding standards committee agreed that Traits should always have the suffix "Trait" and there isn't a way to enforce this.

Steps to reproduce

Proposed resolution

Add a sniff ;-)

Remaining tasks

User interface changes

API changes

Data model changes

Comments

quietone created an issue. See original summary.

  • klausi authored 884ede07 on 9.x
    feat(TraitNameSuffix): Enable sniff (#3557537)
    
    
klausi’s picture

Version: 8.3.x-dev » 9.x-dev
Status: Active » Fixed

Thanks for reporting, good idea!

There is an upstream sniff Generic.NamingConventions.TraitNameSuffix and this has been enabled in Coder 9. Merged in https://github.com/pfrenssen/coder/pull/282 .

Do you need it in Coder 8? For core I don't think so, as Drupal core still has the forked phpcs.xml instead of using the Coder ruleset. So you can enable the same sniff there.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.