-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathphpcs.xml.dist
72 lines (57 loc) · 2.29 KB
/
phpcs.xml.dist
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0"?>
<ruleset name="Coil Web Monetization">
<config name="testVersion" value="7.1-"/>
<exclude-pattern>build/*</exclude-pattern>
<exclude-pattern>dist/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>releases/*</exclude-pattern>
<exclude-pattern>tests/phpunit/bootstrap\.php</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>Gruntfile\.js</exclude-pattern>
<exclude-pattern>*/assets/*</exclude-pattern>
<arg name="parallel" value="8" />
<arg name="extensions" value="php,css,scss,css" />
<!-- Ban inline assignment in control structures. -->
<rule ref="PSR2R.ControlStructures.NoInlineAssignment" />
<rule ref="WordPress-Core">
<exclude name="WordPress.PHP.YodaConditions" />
</rule>
<!-- Prefer alignment over line length. -->
<rule ref="WordPress.Arrays.MultipleStatementAlignment">
<properties>
<property name="maxColumn" value="1000" />
</properties>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="coil-web-monetization" />
</properties>
</rule>
<!-- Allow the use of filesystem functions since we require modern-ish PHP. -->
<rule ref="WordPress.WP.AlternativeFunctions">
<properties>
<property name="exclude" value="file_get_contents,file_system_read" />
<property name="exclude" value="json_encode,json_decode" />
</properties>
</rule>
<!-- Disallow long array syntax. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<rule ref="Generic.Arrays">
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
</rule>
<!-- Single statement on same line. -->
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<!-- Namespacing required for classes. -->
<rule ref="PSR1.Classes.ClassDeclaration" />
<!-- Declare symbols or run code, but not both. -->
<rule ref="PSR1.Files.SideEffects" />
<!-- Namespacing required for functions. -->
<rule ref="PSR2.Namespaces.NamespaceDeclaration" />
<!-- Namespacing of `use` statements. -->
<rule ref="PSR2.Namespaces.UseDeclaration">
<exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations" />
</rule>
<rule ref="PSR2R.Namespaces.UnusedUseStatement" />
<rule ref="PSR2R.Namespaces.UseInAlphabeticalOrder" />
<rule ref="PHPCompatibilityWP" />
</ruleset>