-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml
More file actions
87 lines (72 loc) · 3.36 KB
/
phpcs.xml
File metadata and controls
87 lines (72 loc) · 3.36 KB
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
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>Simplex coding standard</description>
<arg name="basepath" value="."/>
<arg name="colors" />
<arg name="parallel" value="75" />
<arg value="p"/>
<!-- Include the whole PSR1 standard -->
<rule ref="PSR1" />
<!-- Include the whole PSR2 standard -->
<rule ref="PSR2">
<!-- Allow a new line after opening brace in conditionals and loops -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen" />
<!-- Allow a new line before closing brace in conditionals and loops -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<!-- No space after 'function' -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction" />
</rule>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.ControlStructures.ControlSignature"/>
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
<rule ref="Squiz.ControlStructures.LowercaseDeclaration"/>
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<rule ref="Squiz.Scope.MemberVarScope"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<!-- Import Zend coding standard (which in turn imports PEAR) -->
<rule ref="Zend">
<!-- but exclude their code analyzer -->
<exclude name="Zend.Debug.CodeAnalyzer"/>
<!-- covered by Squiz ControlSignature, which enforces try/catch as well -->
<exclude name="PEAR.ControlStructures.ControlSignature"/>
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags"/>
<!-- covered by Squiz FunctionDeclarationSniff -->
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
</rule>
<!-- Don't enforce Zend's private member underscores -->
<rule ref="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore">
<severity>0</severity>
</rule>
<!-- Use Symfony style multiline function calls, not Zend's -->
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<!-- Tests may use snake case method names -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/Test/*</exclude-pattern>
</rule>
<!-- Tests may have long method names -->
<rule ref="Generic.Files.LineLength">
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/Test/*</exclude-pattern>
</rule>
</ruleset>