-
Notifications
You must be signed in to change notification settings - Fork 15
/
phpcs.xml
108 lines (94 loc) · 4.12 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"?>
<!--
- https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
- https://github.com/squizlabs/PHP_CodeSniffer/tree/master/CodeSniffer/Standards
-->
<ruleset name="Diff">
<rule ref="Generic.Classes" />
<rule ref="Generic.CodeAnalysis" />
<rule ref="Generic.ControlStructures" />
<rule ref="Generic.Files.ByteOrderMark" />
<rule ref="Generic.Files.EndFileNewline" />
<rule ref="Generic.Files.InlineHTML" />
<rule ref="Generic.Files.LineEndings" />
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120" />
<property name="absoluteLineLimit" value="120" />
</properties>
</rule>
<rule ref="Generic.Files.OneClassPerFile" />
<rule ref="Generic.Files.OneInterfacePerFile" />
<rule ref="Generic.Files.OneTraitPerFile" />
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<rule ref="Generic.Functions.CallTimePassByReference" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" value="3" />
<property name="absoluteNestingLevel" value="3" />
</properties>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="10" />
<property name="absoluteComplexity" value="10" />
</properties>
</rule>
<rule ref="Generic.NamingConventions">
<exclude name="Generic.NamingConventions.AbstractClassNamePrefix"/>
<exclude name="Generic.NamingConventions.InterfaceNameSuffix"/>
</rule>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps">
<!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". -->
<exclude-pattern>tests.unit*Test\.php</exclude-pattern>
</rule>
<rule ref="Generic.PHP.CharacterBeforePHPOpeningTag" />
<rule ref="Generic.PHP.DeprecatedFunctions" />
<rule ref="Generic.PHP.DisallowShortOpenTag" />
<rule ref="Generic.PHP.ForbiddenFunctions" />
<rule ref="Generic.PHP.LowerCaseConstant" />
<rule ref="Generic.PHP.LowerCaseKeyword" />
<rule ref="Generic.PHP.NoSilencedErrors" />
<rule ref="Generic.PHP.SAPIUsage" />
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
<rule ref="PSR1" />
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<!-- Exclude test methods like "testGivenInvalidInput_methodThrowsException". -->
<exclude-pattern>tests.unit*Test\.php</exclude-pattern>
</rule>
<rule ref="PSR2.Classes.PropertyDeclaration" />
<rule ref="PSR2.ControlStructures.ElseIfDeclaration" />
<rule ref="PSR2.Files" />
<rule ref="PSR2.Namespaces" />
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<rule ref="Squiz.CSS.SemicolonSpacing" />
<rule ref="Squiz.Classes.DuplicateProperty" />
<rule ref="Squiz.Classes.SelfMemberReference" />
<rule ref="Squiz.Classes.ValidClassName" />
<rule ref="Squiz.Functions.FunctionDuplicateArgument" />
<rule ref="Squiz.Functions.GlobalFunction" />
<rule ref="Squiz.Scope" />
<rule ref="Squiz.Strings.DoubleQuoteUsage">
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
</rule>
<rule ref="Squiz.WhiteSpace.CastSpacing" />
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing" />
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing" />
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace" />
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing" />
<rule ref="Squiz.WhiteSpace.SemicolonSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Zend.Files.ClosingTag" />
</ruleset>