Skip to content

Commit

Permalink
Adding some rule exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
snake14 committed Dec 5, 2024
1 parent 9f085ea commit 0a4e0c0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<!-- Classnames for our update files don't match PascalCase, this can't be changed easily -->
<exclude-pattern>Updates/*</exclude-pattern>
<exclude-pattern>PhpSecInfo/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>

<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<!-- Allow using method name with underscore prefix -->
<exclude-pattern>PhpSecInfo/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
</rule>

<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
Expand All @@ -33,4 +41,10 @@
<!-- Allow using multiple classes in one file for tests -->
<exclude-pattern>tests/*</exclude-pattern>
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<!-- Allow no namespace -->
<exclude-pattern>PhpSecInfo/PhpSecInfo.php</exclude-pattern>
<exclude-pattern>PhpSecInfo/Test/*</exclude-pattern>
</rule>
</ruleset>

0 comments on commit 0a4e0c0

Please sign in to comment.