-
Notifications
You must be signed in to change notification settings - Fork 7
/
phpcs.xml
119 lines (98 loc) · 4.08 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
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pcsg-generated-ruleset">
<description>PHP Code Sniffer for Package</description>
<arg name="colors"/>
<rule ref="PSR2">
<exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast.NoSpace">
<type>warning</type>
</rule>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" value="7"/>
</properties>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="20"/>
<property name="absoluteComplexity" value="40"/>
</properties>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity.TooHigh">
<type>warning</type>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity.MaxExceeded">
<type>warning</type>
</rule>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.PHP.NoSilencedErrors"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="Generic.Commenting.Todo.CommentFound">
<message>Please review this TODO comment: %s</message>
<type>warning</type>
</rule>
<rule ref="Generic.Commenting.Fixme.TaskFound">
<message>Please review this FIXME comment: %s</message>
<type>warning</type>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="200"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude name="Generic.Files.LineLength.MaxExceeded"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>
<!--
<rule ref="Generic.Files.LineLength.MaxExceeded">
<message>Line contains %s chars, which is longer than the max limit of %s</message>
<type>warning</type>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
<message>Line longer than %s characters; contains %s characters</message>
<type>warning</type>
</rule> -->
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<rule ref="PEAR.ControlStructures.MultiLineCondition"/>
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="MySource.PHP.GetRequestData"/>
<!--
<rule ref="MySource.PHP.ReturnFunctionValue"/>
-->
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines">
<type>warning</type>
</rule>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<!--
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
-->
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.Scope.StaticThisUsage"/>
</ruleset>