Skip to content

Commit

Permalink
Add compatibility with slevomat/coding-standard v6
Browse files Browse the repository at this point in the history
Update nestingLevel and forbiddenFunctions and add BacktickOperator rule
  • Loading branch information
BafS committed Jan 7, 2020
1 parent a2e3514 commit a1045a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Proton/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<rule ref="PEAR.Commenting.InlineComment"/>

<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.PHP.BacktickOperator"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
Expand Down Expand Up @@ -48,6 +49,7 @@
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="chop" value="rtrim"/>
<element key="close" value="closedir"/>
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
Expand Down Expand Up @@ -85,8 +87,8 @@

<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" value="5"/>
<property name="absoluteNestingLevel" value="8"/>
<property name="nestingLevel" value="4"/>
<property name="absoluteNestingLevel" value="6"/>
</properties>
</rule>

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "ProtonLabs Coding Standard",
"type": "phpcodesniffer-standard",
"keywords": [
"protonlabs",
"php-codesniffer",
"coding-standard"
],
Expand All @@ -11,7 +12,7 @@
"prefer-stable": true,
"require": {
"php": "^7.1",
"slevomat/coding-standard": "^5.0",
"slevomat/coding-standard": "^5.0|^6.0",
"squizlabs/php_codesniffer": "^3.5"
},
"license": "MIT"
Expand Down

0 comments on commit a1045a8

Please sign in to comment.