-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
155 lines (137 loc) · 6.73 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0"?>
<ruleset name="template coding standard">
<arg value="p"/>
<arg name="colors"/>
<rule ref="PSR1">
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
</rule>
<rule ref="PSR12">
<exclude name="PSR12.Files.OpenTag.NotAlone"/>
<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>
<exclude name="PSR12.Files.FileHeader.SpacingInsideBlock"/>
</rule>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<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="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions"
type="array"
value="dump=>null,dd=>null,var_dump=>null,echo=>$output->writeln,die=>null,exit=>null"/>
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="60"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="160"/>
<property name="absoluteLineLimit" value="180"/>
</properties>
</rule>
<file>src</file>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/config/*</exclude-pattern>
<exclude-pattern>*/database/*</exclude-pattern>
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>
<rule ref="SlevomatCodingStandard.Arrays.ArrayAccess"/>
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace">
<properties>
<property name="spacesAroundBrackets" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Attributes.DisallowAttributesJoining"/>
<rule ref="SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine"/>
<rule ref="SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment"/>
<rule ref="SlevomatCodingStandard.Classes.BackedEnumTypeSpacing">
<properties>
<property name="spacesCountBeforeColon" value="0"/>
<property name="spacesCountBeforeType" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
<property name="linesCountBeforeClosingBrace" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.MethodSpacing">
<properties>
<property name="minLinesCount" value="1"/>
<property name="maxLinesCount" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.PropertyDeclaration">
<properties>
<property name="enableMultipleSpacesBetweenModifiersCheck"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition">
<properties>
<property name="ignoreAssignmentsInsideFunctionCalls"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireShortTernaryOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/>
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
<rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction"/>
<rule ref="SlevomatCodingStandard.Functions.NamedArgumentSpacing"/>
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
<rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
<properties>
<property name="linesCountBeforeFirstUse" value="1"/>
<property name="linesCountBetweenUseTypes" value="1"/>
<property name="linesCountAfterLastUse" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
<rule ref="SlevomatCodingStandard.Operators.RequireOnlyStandaloneIncrementAndDecrementOperators"/>
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
<properties>
<property name="spacesCountBeforeColon" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable"/>
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces"/>
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
</ruleset>