-
Notifications
You must be signed in to change notification settings - Fork 7
/
phpcs.xml
128 lines (111 loc) · 4.89 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
120
121
122
123
124
125
126
127
128
<?xml version="1.0"?>
<ruleset name="Leonid74">
<description>Leonid74 custom coding standard.</description>
<arg name="extensions" value="php,inc" />
<exclude-pattern>*/.history/*</exclude-pattern>
<exclude-pattern>*/.vscode/*</exclude-pattern>
<exclude-pattern>*/logs/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<rule ref="PSR1">
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<!-- <exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/> -->
</rule>
<rule ref="PSR12">
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
<exclude name="PSR12.Files.OpenTag.NotAlone"/>
<exclude name="PSR12.Files.FileHeader.IncorrectOrder"/>
<exclude name="PSR12.Files.DeclareStatement.SpaceFoundBeforeDirective"/>
<exclude name="PSR12.Files.DeclareStatement.SpaceFoundAfterDirectiveValue"/>
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
<exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpaceBeforeCloseBrace"/>
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
<include name="PEAR.Functions.FunctionCallSignature"/>
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" extend="true">
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
<element key="print" value="echo"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="500" />
<property name="absoluteLineLimit" value="0" />
<property name="ignoreComments" value="true" />
</properties>
</rule>
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing">
<properties>
<property name="spacing" value="1" />
</properties>
</rule>
<rule ref="Generic.Formatting.SpaceAfterNot">
<properties>
<property name="spacing" value="0" />
</properties>
</rule>
<!-- <rule ref="Squiz.PHP.DiscouragedFunctions">
<properties>
<property name="error" value="false" />
</properties>
</rule> -->
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<!-- <rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
</properties>
</rule> -->
<rule ref="PSR2.Methods.FunctionCallSignature">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
<property name="allowMultipleArguments" value="false" />
</properties>
</rule>
<rule ref="PSR2.ControlStructures.ControlStructureSpacing">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
</properties>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" />
<property name="allowMultipleArguments" value="false" />
</properties>
</rule>
<rule ref="NeutronStandard">
<!-- <exclude name="NeutronStandard.Constants.DisallowDefine.Define"/>
<exclude name="NeutronStandard.Functions.TypeHint.NoArgumentType"/>
<exclude name="NeutronStandard.Functions.TypeHint.NoReturnType"/> -->
<exclude name="NeutronStandard.Functions.LongFunction.LongFunction"/>
<exclude name="NeutronStandard.Functions.DisallowCallUserFunc.CallUserFunc"/>
<exclude name="NeutronStandard.Functions.VariableFunctions.VariableFunction"/>
<exclude name="NeutronStandard.Globals.DisallowGlobalFunctions.GlobalFunctions"/>
<exclude name="NeutronStandard.StrictTypes.RequireStrictTypes.StrictTypes"/>
</rule>
</ruleset>