Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 0 additions & 212 deletions coder_sniffer/Drupal/Sniffs/Classes/FullyQualifiedNamespaceSniff.php

This file was deleted.

18 changes: 17 additions & 1 deletion coder_sniffer/Drupal/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

<!-- PSR-2 sniffs -->
<rule ref="PSR2.Classes.PropertyDeclaration">
<!-- Already covered by Drupal.Classes.PropertyDeclaration.VarUsed. -->
<!-- Already covered by Drupal.Classes.PropertyDeclaration.VarUsed. -->
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed"/>
</rule>
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
Expand All @@ -120,6 +120,22 @@
<!-- SlevomatCodingStandard sniffs -->
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<!-- Allow global names with backslash like \Drupal. -->
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFullyQualifiedGlobalClasses" value="true"/>
<property name="allowFullyQualifiedGlobalFunctions" value="true"/>
<property name="allowFullyQualifiedGlobalConstants" value="true"/>
<property name="allowFallbackGlobalFunctions" value="true"/>
<property name="allowFallbackGlobalConstants" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName">
<exclude-pattern>*.api.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedNameWithoutNamespace">
<severity>0</severity>
</rule>
<rule ref="SlevomatCodingStandard.PHP.ShortList"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing"/>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ext-mbstring": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1 || ^1.0.0",
"sirbrillig/phpcs-variable-analysis": "^2.11.7",
"slevomat/coding-standard": "^8.11",
"slevomat/coding-standard": "^8.15",
"squizlabs/php_codesniffer": "^3.11.2",
"symfony/yaml": ">=3.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc.fixed
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use Vendor\DateTools\DateInterval;
use Vendor\DateTools;
use Vendor\DateTools\DateInterval;

$x = array(new Foo(), array());
$y = new Foo();
Expand Down
78 changes: 0 additions & 78 deletions tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Drupal/Classes/UnusedUseStatementUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace MyNamespace\Depth;

use Thing\NotUsed;
use Thing\Fail\ActuallyUsed;
use Test\TraitTest;
use Thing\NotUsed;
use Thing\DifferentName as UsedOtherName;
use Example\MyUrlHelper;
use MyNamespace\Depth\SomeClass as CoreSomeClass;
Expand Down
4 changes: 3 additions & 1 deletion tests/Drupal/Commenting/ClassCommentUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Testing class/trait comments.
*/

use Some\Attribute;

/**
*
*/
Expand Down Expand Up @@ -60,7 +62,7 @@ class WrongSpacing {
/**
* This is correct.
*/
#[Some\Attribute(foo: 'bar')]
#[Attribute(foo: 'bar')]
#[Other\Attribute(baz: 'qux')]
class DoubleAttribute {

Expand Down
4 changes: 3 additions & 1 deletion tests/Drupal/Commenting/FunctionCommentUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Some function comment tests.
*/

use Some\Attribute;

/**
* Test.
*
Expand Down Expand Up @@ -579,7 +581,7 @@ class Test41 {
/**
* Method docblock.
*/
#[Some\Attribute(foo: 'bar')]
#[Attribute(foo: 'bar')]
#[Other\Attribute(baz: 'qux')]
public function method() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* without them.
* phpcs:disable Drupal.Commenting
*/

use Foo\Bar;

/**
Expand Down
Loading
Loading