Skip to content

Commit e2766de

Browse files
committed
refactor(MethodDeclaration): Use upstream sniff
1 parent 5b3d4e1 commit e2766de

File tree

3 files changed

+3
-47
lines changed

3 files changed

+3
-47
lines changed

coder_sniffer/Drupal/Sniffs/Methods/MethodDeclarationSniff.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

coder_sniffer/Drupal/ruleset.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
<!-- Do not run this sniff on template files. -->
2323
<exclude-pattern>*.tpl.php</exclude-pattern>
2424
</rule>
25-
26-
<!-- Silence method name underscore warning which is covered already in
27-
Drupal.NamingConventions.ValidFunctionName.ScopeNotCamelCaps. -->
28-
<rule ref="Drupal.Methods.MethodDeclaration.Underscore">
29-
<severity>0</severity>
30-
</rule>
31-
3225
<rule ref="Drupal.WhiteSpace.CloseBracketSpacing">
3326
<!-- Do not run this sniff on template files. -->
3427
<exclude-pattern>*.tpl.php</exclude-pattern>
@@ -119,6 +112,7 @@
119112
<!-- Already covered by Drupal.Classes.PropertyDeclaration.VarUsed. -->
120113
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed"/>
121114
</rule>
115+
<rule ref="PSR2.Methods.MethodDeclaration"/>
122116
<rule ref="PSR2.Namespaces.NamespaceDeclaration"/>
123117
<rule ref="PSR2.Namespaces.UseDeclaration"/>
124118

tests/Drupal/bad/BadUnitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ protected function getWarningList(string $testFile): array
446446
363 => 1,
447447
366 => 1,
448448
382 => 1,
449+
407 => 1,
450+
411 => 1,
449451
433 => 1,
450452
434 => 1,
451453
436 => 1,

0 commit comments

Comments
 (0)