Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit bb33c26

Browse files
Update ruleset.xml
1 parent 6d62ac3 commit bb33c26

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Neuralab/ruleset.xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
<?xml version="1.0"?>
22
<ruleset name="Neuralab">
33
<description>a.neuralab.coding-standard</description>
4-
4+
55
<rule ref="Neuralab-Silent"/>
6-
<rule ref="WordPress-Core" />
6+
<rule ref="WordPress-Core">
7+
<!-- Shorthand ternary operators are nice and we want to use them -->
8+
<!-- see https://www.php.net/manual/en/control-structures.if.php#102060 -->
9+
<exclude name="WordPress.PHP.DisallowShortTernary" />
10+
<!-- We prefer short -->
11+
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
12+
</rule>
713
<rule ref="WordPress-Docs">
814
<!-- Don't force file comments -->
915
<exclude name="Squiz.Commenting.FileComment"/>
1016
<!-- Allow embedded php without semicolon -->
1117
<exclude name="Squiz.PHP.EmbeddedPhp.NoSemicolon"/>
18+
<!-- Don't force Yoda -->
19+
<exclude name="WordPress.PHP.YodaConditions" />
1220
</rule>
1321
<rule ref="WordPress-Extra"/>
1422

23+
<!-- We prefer short -->
24+
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
1525
</ruleset>

0 commit comments

Comments
 (0)