Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 733 Bytes

ordered_traits.rst

File metadata and controls

35 lines (24 loc) · 733 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
@@ -1,2 +1,2 @@
 <?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.