-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
51 lines (42 loc) · 1.66 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
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0"?>
<ruleset name="Block Manager Coding Standards">
<arg name="extensions" value="php" />
<arg name="colors" />
<arg value="s" /><!-- Show sniff codes in all reports. -->
<arg value="p" /><!-- Show progress. -->
<!--
PHP 8.0 and higher.
-->
<config name="testVersion" value="8.0-" />
<rule ref="PHPCompatibilityWP" />
<rule ref="WordPress">
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="Universal.Operators.DisallowShortTernary.Found" />
<exclude name="WordPress.WP.AlternativeFunctions" />
<!-- Sometimes we use the PSR4 autoloading standard which conflicts with these rules. -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<!-- Allow . in hook names. -->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="." />
</properties>
</rule>
<!-- Generic. -->
<!-- Disallow long array syntax. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<!-- Exclusions. -->
<!-- Build tool config/scripts. -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- Other files and folders -->
<exclude-pattern>/*.asset.php</exclude-pattern>
<exclude-pattern>/db.php</exclude-pattern>
<exclude-pattern>/index.php</exclude-pattern>
<exclude-pattern>/uploads/*</exclude-pattern>
<exclude-pattern>/images/*</exclude-pattern>
<exclude-pattern>/languages/*</exclude-pattern>
<exclude-pattern>/mu-plugins/*</exclude-pattern>
</ruleset>