-
Notifications
You must be signed in to change notification settings - Fork 32
/
phpcs.xml
executable file
·41 lines (37 loc) · 2.08 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
34
35
36
37
38
39
40
41
<?xml version="1.0"?>
<ruleset name="Papi">
<description>Papi rules for PHP_CodeSniffer</description>
<exclude-pattern>node_modules/*</exclude-pattern>
<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="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure" />
<exclude name="PSR2" />
<!-- allow papi-loader.php -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<!-- 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" />
<exclude name="WordPress.Arrays.CommaAfterArrayItem.NoComma" />
<!-- allow opening/closing tag on same line -->
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd" />
</rule>
<rule ref="WordPress.XSS.EscapeOutput" />
<rule ref="WordPress.PHP.StrictComparisons" />
<rule ref="WordPress.PHP.StrictInArray" />
</ruleset>