-
Notifications
You must be signed in to change notification settings - Fork 4
/
phpcs.xml
109 lines (90 loc) · 3.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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0"?>
<ruleset name="nyco">
<description>PSR2 with two spaces, braces on same line</description>
<!-- Set width of output -->
<arg name="report-width" value="100" />
<!-- Show colors in console -->
<arg value="-colors" />
<!-- Set tab width to 1, the width of 1 tab is two spaces -->
<arg name="tab-width" value="1" />
<!-- Scan only PHP files -->
<arg name="extensions" value="php" />
<!-- Allow the report to be generated but do not error out -->
<config name="ignore_errors_on_exit" value="0" />
<config name="ignore_warnings_on_exit" value="1" />
<!-- Files to scan -->
<file>wp-content/themes/access/</file>
<file>wp-content/mu-plugins/</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>
<exclude-pattern>wp-content/mu-plugins/wp-assets/</exclude-pattern>
<exclude-pattern>wp-content/mu-plugins/wp-config/</exclude-pattern>
<exclude-pattern>wp-content/mu-plugins/wp-s3-all-import-compatibility/</exclude-pattern>
<exclude-pattern>wp-content/mu-plugins/wp-send-me-nyc/</exclude-pattern>
<exclude-pattern>wp-content/mu-plugins/wp-login/</exclude-pattern>
<exclude-pattern>wp-content/themes/access/node_modules/</exclude-pattern>
<!-- This file is a lift from native WordPress so it won't conform to the standard set by this file -->
<exclude-pattern>wp-content/mu-plugins/wp-stat-collector/WordPressDatabaseSSL.php</exclude-pattern>
<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="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>