-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
33 lines (29 loc) · 1.61 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0"?>
<ruleset name="2FA">
<description>2FA rules for PHP_CodeSniffer</description>
<exclude-pattern>vendor/*</exclude-pattern>
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<rule ref="WordPress-Core">
<exclude name="PEAR.Functions.FunctionCallSignature.EmptyLine" />
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
<exclude name="WordPress.Arrays.ArrayDeclaration" />
<exclude name="WordPress.PHP.YodaConditions" />
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBetweenStructureColon" />
<exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<exclude name="Generic.PHP.DisallowAlternativePHPTags.MaybeASPShortOpenTagFound" />
<exclude name="Generic.PHP.DisallowAlternativePHPTags.MaybeASPOpenTagFound" />
<exclude name="PSR2" />
<!-- allow if ( $value = func() ) -->
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found" />
<!-- allow __, esc_html__ and so without translators comment -->
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<!-- allow ['key' => $value] -->
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeKeyFound" />
</rule>
<rule ref="WordPress.Security.EscapeOutput" />
<rule ref="WordPress.PHP.StrictComparisons" />
<rule ref="WordPress.PHP.StrictInArray" />
</ruleset>