phpinsights icon indicating copy to clipboard operation
phpinsights copied to clipboard

Ordered imports verification is incorrect

Open kjdev opened this issue 2 years ago • 0 comments

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.

kjdev avatar Nov 30 '23 04:11 kjdev