Skip to content

Commit fd98546

Browse files
authored
fix(AlphabeticallySortedUses): Remove use statement order rule (#3483028)
1 parent c58e5a0 commit fd98546

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

coder_sniffer/Drupal/ruleset.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@
121121
<rule ref="PSR2.Namespaces.UseDeclaration" />
122122

123123
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
124-
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
125-
<properties>
126-
<property name="caseSensitive" value="true"/>
127-
</properties>
128-
</rule>
129124
<rule ref="SlevomatCodingStandard.PHP.ShortList" />
130125
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
131126
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing"/>

tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
use Vendor\DateTools;
43
use Vendor\DateTools\DateInterval;
4+
use Vendor\DateTools;
55

66
$x = array(new Foo(), array());
77
$y = new Foo();

tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.inc.fixed

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* Example.
66
*/
77

8-
use Test\Alias as TestAlias;
9-
use Test\Bar;
10-
use Test\Foo;
11-
use Test\MultiLine as MultiLineAlias;
128
use Test\MultiLineSecond;
9+
use Test\Foo;
1310
use Test\NotUsed;
11+
use Test\Bar;
12+
use Test\Alias as TestAlias;
13+
use Test\MultiLine as MultiLineAlias;
1414

1515
/**
1616
* Example.

tests/Drupal/Classes/UnusedUseStatementUnitTest.inc.fixed

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace MyNamespace\Depth;
44

5-
use Example\MyUrlHelper;
6-
use MyNamespace\Depth\SomeClass as CoreSomeClass;
5+
use Thing\NotUsed;
6+
use Thing\Fail\ActuallyUsed;
77
use Test\TraitTest;
88
use Thing\DifferentName as UsedOtherName;
9-
use Thing\Fail\ActuallyUsed;
10-
use Thing\NotUsed;
9+
use Example\MyUrlHelper;
10+
use MyNamespace\Depth\SomeClass as CoreSomeClass;
1111

1212
/**
1313
* Bla.

tests/Drupal/Classes/UseGlobalClassUnitTest.inc.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
* Example.
66
*/
77

8-
use Namespaced\MultiLine2 as MultiLineAlias2;
98
use Namespaced\TestClass;
109
use Namespaced\TestClassSecond as NamespacedAlias;
10+
use Namespaced\MultiLine2 as MultiLineAlias2;
1111
use function count;
1212

1313
/**

0 commit comments

Comments
 (0)