Skip to content

Commit a1045a8

Browse files
committed
Add compatibility with slevomat/coding-standard v6
Update nestingLevel and forbiddenFunctions and add BacktickOperator rule
1 parent a2e3514 commit a1045a8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Proton/ruleset.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<rule ref="PEAR.Commenting.InlineComment"/>
1717

1818
<rule ref="Generic.Commenting.Todo"/>
19+
<rule ref="Generic.PHP.BacktickOperator"/>
1920
<rule ref="Generic.PHP.LowerCaseKeyword"/>
2021
<rule ref="Generic.PHP.DeprecatedFunctions"/>
2122
<rule ref="Generic.Formatting.SpaceAfterCast"/>
@@ -48,6 +49,7 @@
4849
<rule ref="Generic.PHP.ForbiddenFunctions">
4950
<properties>
5051
<property name="forbiddenFunctions" type="array">
52+
<element key="chop" value="rtrim"/>
5153
<element key="close" value="closedir"/>
5254
<element key="sizeof" value="count"/>
5355
<element key="delete" value="unset"/>
@@ -85,8 +87,8 @@
8587

8688
<rule ref="Generic.Metrics.NestingLevel">
8789
<properties>
88-
<property name="nestingLevel" value="5"/>
89-
<property name="absoluteNestingLevel" value="8"/>
90+
<property name="nestingLevel" value="4"/>
91+
<property name="absoluteNestingLevel" value="6"/>
9092
</properties>
9193
</rule>
9294

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "ProtonLabs Coding Standard",
44
"type": "phpcodesniffer-standard",
55
"keywords": [
6+
"protonlabs",
67
"php-codesniffer",
78
"coding-standard"
89
],
@@ -11,7 +12,7 @@
1112
"prefer-stable": true,
1213
"require": {
1314
"php": "^7.1",
14-
"slevomat/coding-standard": "^5.0",
15+
"slevomat/coding-standard": "^5.0|^6.0",
1516
"squizlabs/php_codesniffer": "^3.5"
1617
},
1718
"license": "MIT"

0 commit comments

Comments
 (0)