Skip to content

Commit

Permalink
Add codesniffer 3.4 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
BafS committed Mar 18, 2019
1 parent b779dc4 commit 0a715f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Proton/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<exclude-pattern>*</exclude-pattern>
</rule>
<rule ref="PSR12.Namespaces.CompoundNamespaceDepth"/>
<rule ref="PSR12.Functions.NullableTypeDeclaration" />

<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
Expand All @@ -19,6 +20,10 @@
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.EmptyPHPStatement" />
<rule ref="Generic.Classes.DuplicateClassName" />
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" />
<rule ref="Generic.VersionControl.GitMergeConflict" />

<!-- All PHP files MUST use the Unix LF (linefeed) line ending only. -->
<rule ref="Generic.Files.LineEndings">
Expand All @@ -44,6 +49,7 @@
<!-- Use casting instead of functions -->
<element key="strval" value="(string)"/>
<element key="intval" value="(int)"/>
<element key="floatval" value="(float)"/>
<element key="boolval" value="(bool)"/>
</property>
</properties>
Expand All @@ -59,7 +65,7 @@
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" value="5" />
<property name="absoluteNestingLevel" value="11" />
<property name="absoluteNestingLevel" value="10" />
</properties>
</rule>

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"require": {
"php": "^7.1",
"slevomat/coding-standard": "^4.8",
"squizlabs/php_codesniffer": "^3.3"
"squizlabs/php_codesniffer": "^3.4"
},
"license": "MIT"
}

0 comments on commit 0a715f9

Please sign in to comment.