Skip to content

Commit cda932a

Browse files
authored
Update phpcs rule references (#245)
1 parent 2bd4b7d commit cda932a

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

bootstrap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
// phpcs:disable Squiz.PHP.DiscouragedFunctions,NeutronStandard.Constants.DisallowDefine
5+
// phpcs:disable Generic.PHP.ForbiddenFunctions.Found
66

77
// There are no core functions to read these constants.
88
define('ABSPATH', './');

phpcs.xml.dist

+6
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@
2424
<rule ref="PSR12NeutronRuleset.Strings.ConcatenationUsage.NotAllowed">
2525
<exclude-pattern>tests/*</exclude-pattern>
2626
</rule>
27+
28+
<!-- Allow long functions in test cases -->
29+
<rule ref="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength">
30+
<exclude-pattern>tests/HookDocsRuleTest.php</exclude-pattern>
31+
<exclude-pattern>tests/HookCallbackRuleTest.php</exclude-pattern>
32+
</rule>
2733
</ruleset>

tests/HookCallbackRuleTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ protected function getRule(): \PHPStan\Rules\Rule
1717
return new HookCallbackRule();
1818
}
1919

20-
// phpcs:ignore NeutronStandard.Functions.LongFunction.LongFunction
2120
public function testRule(): void
2221
{
2322
// first argument: path to the example file that contains some errors that should be reported by HookCallbackRule

tests/HookDocsRuleTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ protected function getRule(): Rule
2626
return new HookDocsRule($fileTypeMapper, $ruleLevelHelper);
2727
}
2828

29-
// phpcs:ignore NeutronStandard.Functions.LongFunction.LongFunction
3029
public function testRule(): void
3130
{
3231
// first argument: path to the example file that contains some errors that should be reported by HookDocsRule

0 commit comments

Comments
 (0)