Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 714 Bytes

ordered_traits.rst

File metadata and controls

34 lines (23 loc) · 714 Bytes

Rule ordered_traits

Trait use statements must be sorted alphabetically.

Warning

Using this rule is risky.

Risky when depending on order of the imports.

Examples

Example #1

--- Original
+++ New
 <?php class Foo { 
-use Z; use A; }
+use A; use Z; }

Rule sets

The rule is part of the following rule sets:

@PhpCsFixer:risky

Using the @PhpCsFixer:risky rule set will enable the ordered_traits rule.

@Symfony:risky

Using the @Symfony:risky rule set will enable the ordered_traits rule.