Closed (fixed)
Project:
Coder
Version:
9.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2025 at 03:42 UTC
Updated:
7 Dec 2025 at 08:29 UTC
Jump to comment: Most recent
The coding standards committee agreed that Traits should always have the suffix "Trait" and there isn't a way to enforce this.
Add a sniff ;-)
Comments
Comment #3
klausiThanks 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.