-
Notifications
You must be signed in to change notification settings - Fork 4
/
.phpcs.xml
108 lines (98 loc) · 4.84 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
<?xml version="1.0"?>
<ruleset name="CJH">
<description>CJH Custom Code-Sniffer Standard</description>
<arg name="bootstrap" value="vendor/zebra-north/phpcs-short-types/short-types.php"/>
<rule ref="PSR2">
<exclude name="PSR2.Methods.FunctionCallSignature.Indent"/>
<exclude name="PSR2.Methods.FunctionCallSignature.CloseBracketLine"/>
<exclude name="PSR2.Methods.FunctionCallSignature.MultipleArguments"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent"/>
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE"/>
<properties>
<property name="indent" value="2"/>
</properties>
</rule>
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace">
<properties>
<property name="indent" value="2"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="192"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<rule ref="Generic.Commenting">
<properties>
<property name="indent" value="2"/>
</properties>
<!-- Allow single-line doc comments. See https://github.com/squizlabs/PHP_CodeSniffer/issues/258. -->
<exclude name="Generic.Commenting.DocComment.ContentAfterOpen" />
<exclude name="Generic.Commenting.DocComment.ContentBeforeClose" />
<exclude name="Generic.Commenting.DocComment.SpacingBeforeShort" />
<!-- Don't require short description -->
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<!-- Doesn't work well with annotations -->
<exclude name="Generic.Commenting.DocComment.TagValueIndent" />
<!-- Allow empty lines between param -->
<exclude name="Generic.Commenting.DocComment.ParamGroup" />
</rule>
PEAR.Commenting.FunctionComment.ParamCommentAlignment
<rule ref="PEAR.Commenting">
<exclude name="PEAR.Commenting.FileComment.IncompleteCopyright"/>
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
<exclude name="PEAR.Commenting.FileComment.IncompleteLicense"/>
<exclude name="PEAR.Commenting.ClassComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingPackageTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingLicenseTag"/>
<exclude name="PEAR.Commenting.ClassComment.MissingLinkTag"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="PEAR.Commenting.FunctionComment.SpacingAfterParamType"/>
<exclude name="PEAR.Commenting.FunctionComment.ParamCommentAlignment"/>
<exclude name="PEAR.Commenting.FunctionComment.SpacingAfterParamName"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn"/>
<exclude name="PEAR.Commenting.FunctionComment.ParamNameNoMatch"/>
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Line"/>
<exclude name="PEAR.Commenting.FunctionComment.MissingParamType"/>
<exclude name="PEAR.Commenting.FunctionComment.WrongStyle"/>
<!-- already included by Squiz -->
<exclude name="PEAR.Commenting.FunctionComment.Missing"/>
<properties>
<property name="indent" value="2"/>
<property name="minimumVisibility" value="protected"/>
</properties>
</rule>
<rule ref="PEAR.Commenting.FileComment.Missing"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="2"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<properties>
<property name="skipIfInheritdoc" value="true"/>
</properties>
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamName"/>
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
<!-- The following would be just anoying. -->
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentNotCapital"/>
<!-- Too much noise. Also, this produces boiler-plate documentation for setter/getter functions -->
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<!-- We should rather use named exceptions than document each throw instruction -->
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows"/>
</rule>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"/>
</rule>
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing">
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
</rule>
</ruleset>