Fork me on GitHub
a Sensio Labs Product

Remote Void (v2.18.5) edition

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.

The logo is © 2010-2014 Sensio Labs