-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpcs.xml.dist
174 lines (145 loc) · 7.33 KB
/
phpcs.xml.dist
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?xml version="1.0"?>
<ruleset name="TH/Maybe">
<arg name="basepath" value="."/>
<arg name="colors"/>
<file>src</file>
<file>tests</file>
<exclude-pattern>tests/examples.php</exclude-pattern>
<rule ref="PSR12">
<exclude name="PSR12.Files.FileHeader" />
<exclude name="PSR12.Files.OpenTag" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration" />
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace" />
</rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml">
<exclude name="SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys" />
<exclude name="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion" />
<exclude name="SlevomatCodingStandard.Classes.RequireSingleLineMethodSignature" />
<exclude name="SlevomatCodingStandard.Classes.RequireSelfReference" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming" />
<exclude name="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment" />
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment" />
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment" />
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses" />
<exclude name="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch" />
<exclude name="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName" />
<exclude name="SlevomatCodingStandard.Functions.DisallowArrowFunction" />
<exclude name="SlevomatCodingStandard.Functions.DisallowEmptyFunction" />
<exclude name="SlevomatCodingStandard.Functions.DisallowNamedArguments" />
<exclude name="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall" />
<exclude name="SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration" />
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter" />
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation" />
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions" />
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants" />
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces" />
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators" />
<exclude name="SlevomatCodingStandard.PHP.DisallowReference" />
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint" />
</rule>
<rule ref="SlevomatCodingStandard.Classes.RequireAbstractOrFinal">
<exclude-pattern>/src/Result/Ok.php</exclude-pattern>
<exclude-pattern>/src/Result/Err.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="true" />
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<properties>
<property name="enableStandaloneNullTrueFalseTypeHints" value="false" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0" />
<property name="linesCountBeforeClosingBrace" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing">
<properties>
<property name="linesCountBeforeFirstUseWhenFirstInClass" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFullyQualifiedGlobalClasses" value="true" />
<property name="allowFullyQualifiedGlobalFunctions" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassStructure">
<exclude-pattern>/tests/</exclude-pattern>
<properties>
<property name="groups" type="array">
<element value="uses"/>
<element value="enum cases"/>
<element value="public constants"/>
<element value="protected constants"/>
<element value="private constants"/>
<element value="public static properties"/>
<element value="protected static properties"/>
<element value="private static properties"/>
<element value="public properties"/>
<element value="protected properties"/>
<element value="private properties"/>
<element value="constructor"/>
<element value="public static methods"/>
<element value="all public methods"/>
<element value="methods"/>
<element value="magic methods"/>
<element value="destructor"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration">
<properties>
<property name="allowDocCommentAboveReturn" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.FunctionLength">
<exclude-pattern>/src/Option.php</exclude-pattern>
<exclude-pattern>/src/Result.php</exclude-pattern>
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Attributes.AttributesOrder">
<properties>
<property name="orderAlphabetically" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint">
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces">
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace">
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing">
<exclude-pattern>/tests/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing">
<exclude-pattern>/tests/type-hinting/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Files.LineLength">
<exclude-pattern>/tests/type-hinting/</exclude-pattern>
</rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>/tests/type-hinting/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.DisallowNonCapturingCatch">
<exclude-pattern>/tests/type-hinting/</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing">
<exclude-pattern>/tests/type-hinting/</exclude-pattern>
</rule>
</ruleset>