Skip to content

Commit dc0ac49

Browse files
authored
Merge pull request #225 from PHPCSStandards/feature/cs-rules-minor-tweak
CS rules: tweak array rules for test files
2 parents 021f82d + 91ae2f4 commit dc0ac49

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

phpcs.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
<severity>0</severity>
8888
</rule>
8989

90+
<!-- Don't enforce single line arrays for single item arrays in test files. Readability over brevity. -->
91+
<rule ref="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed">
92+
<exclude-pattern>tests/*\.php$</exclude-pattern>
93+
<exclude-pattern>Standards/*/Tests/*/*UnitTest\.php$</exclude-pattern>
94+
</rule>
95+
9096
<!-- Check var names, but we don't want leading underscores for private vars -->
9197
<rule ref="Squiz.NamingConventions.ValidVariableName"/>
9298
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">

0 commit comments

Comments
 (0)