phpinsights
phpinsights copied to clipboard
Ordered imports verification is incorrect
| Q | A |
|---|---|
| Bug report? | yes |
| Feature request? | no |
| Library version | 2.10.0 |
source:
use Test\Name as Alias;
use Test\Name\Aggregate;
result:
• [Style] Ordered imports: (PhpCsFixer\Fixer\Import\OrderedImportsFixer)
@@ - + @@
+use Test\Name\Aggregate;
use Test\Name as Alias;
@@ - + @@
use Test\Name as Alias;
-use Test\Aggregate;
Sort order verification is incorrect.
If you change it according to the instructions.
source:
use Test\Name\Aggregate;
use Test\Name as Alias;
result:
• [Style] Alphabetically sorted uses: (SlevomatCodingStandard\Sniffs\Namespaces\AlphabeticallySortedUsesSniff)
Use statements should be sorted alphabetically. The first wrong one is Test\Name.
An error occurs due to another rule, Error due to another rule.