forked from hoppinger/advanced-custom-fields-wpcli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcodesniffer.xml
94 lines (75 loc) · 3.51 KB
/
.phpcodesniffer.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
<?xml version="1.0"?>
<ruleset name="Hoppinger">
<description>Non-controversial generally-agreed upon WordPress Coding Standards</description>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#brace-style -->
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
<severity>0</severity>
</rule>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#remove-trailing-spaces -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#no-shorthand-php-tags -->
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<!-- important to prevent issues with content being sent before headers -->
<rule ref="Generic.Files.ByteOrderMark"/>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#naming-conventions -->
<rule ref="Generic.PHP.LowerCaseConstant"/>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#indentation -->
<arg name="tab-width" value="2"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
<property name="spaceIndent" value="true"/>
</properties>
</rule>
<!-- http://make.wordpress.org/core/handbook/coding-standards/php/#error-control-operator -->
<rule ref="Generic.PHP.NoSilencedErrors" />
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<severity>0</severity>
</rule>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Files.LineEndings">
<properties>
<property name="eolChar" value="\n"/>
</properties>
</rule>
<rule ref="Generic.Files.EndFileNewline"/>
<!-- https://make.wordpress.org/core/handbook/coding-standards/php/#naming-conventions -->
<rule ref="Generic.Files.LowercasedFilename"/>
<!-- https://make.wordpress.org/core/handbook/coding-standards/php/#space-usage -->
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<!-- https://make.wordpress.org/core/handbook/coding-standards/php/#brace-style -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1" />
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<rule ref="WordPress.Arrays.ArrayDeclaration">
<exclude name="WordPress.Arrays.ArrayDeclaration.SingleLineNotAllowed" />
</rule>
<rule ref="WordPress.Arrays.ArrayKeySpacingRestrictions"/>
<rule ref="WordPress.Classes.ValidClassName"/>
<rule ref="WordPress.Files.FileName"/>
<rule ref="WordPress.NamingConventions.ValidFunctionName"/>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing"/>
<rule ref="WordPress.WhiteSpace.OperatorSpacing"/>
<rule ref="WordPress.WhiteSpace.CastStructureSpacing"/>
</ruleset>