-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
93 lines (77 loc) · 2.72 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0"?>
<ruleset name="nyco">
<description>PSR2 with two spaces, braces on same line</description>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Files to scan -->
<file>wp-content/mu-plugins/</file>
<!-- <file>wp-content/themes/servicedesign/</file> -->
<!-- Ignore WordPress, Composer dependencies, and specific libraries -->
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>wp-admin/</exclude-pattern>
<exclude-pattern>wp-includes/</exclude-pattern>
<exclude-pattern>wp-content/languages/</exclude-pattern>
<exclude-pattern>wp-content/plugins/</exclude-pattern>
<exclude-pattern>wp-content/uploads/</exclude-pattern>
<!-- Show colors in console -->
<arg value="-colors"/>
<arg name="tab-width" value="1"/>
<rule ref="PSR2" />
<rule ref="PSR2">
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction" />
</rule>
<rule ref="Generic.Arrays.ArrayIndent">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
<property name="exact" value="true"/>
<property name="tabIndent" value="false" />
</properties>
</rule>
<rule ref="Squiz.ControlStructures.ControlSignature">
<properties>
<property name="requiredSpacesBeforeColon" value="0" />
</properties>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
</rule>
<rule ref="PSR2.Methods.FunctionCallSignature">
<properties>
<property name="indent" value="2" />
<property name="allowMultipleArguments" value="true" />
<property name="requiredSpacesAfterOpen" value="0" />
<property name="requiredSpacesBeforeClose" value="0" />
</properties>
</rule>
<rule ref="PSR2.ControlStructures.SwitchDeclaration">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
<rule ref="PSR2.Methods.FunctionCallSignature">
<properties>
<property name="indent" value="2" />
</properties>
</rule>
</ruleset>