forked from phpmyadmin/coding-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruleset.xml
More file actions
127 lines (108 loc) · 5.62 KB
/
Copy pathruleset.xml
File metadata and controls
127 lines (108 loc) · 5.62 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
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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="phpMyAdmin coding standard" xsi:noNamespaceSchemaLocation="../vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>The phpMyAdmin coding standard.</description>
<!-- Import Doctrine coding standard (base) -->
<rule ref="Doctrine">
<!-- Do not require multiple assignment alignment -->
<exclude name="Generic.Formatting.MultipleStatementAlignment"/>
<!-- Disable the superfluous class naming rules -->
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming"/>
<!-- Do not replace /* @var type $foo */ and similar simple inline annotations with assert() -->
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion"/>
<!-- Checked by Generic.WhiteSpace.LanguageConstructSpacing -->
<exclude name="Squiz.WhiteSpace.LanguageConstructSpacing"/>
</rule>
<rule ref="Generic.WhiteSpace.LanguageConstructSpacing"/>
<!-- Enforces conditions to be on a single line when it fit on the line. -->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition">
<properties>
<property name="alwaysForSimpleConditions" value="false"/>
</properties>
</rule>
<!-- Enforces function call to be on a single line when it fits on the line. -->
<rule ref="SlevomatCodingStandard.Functions.RequireSingleLineCall"/>
<!-- Checks duplicate spaces. -->
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces">
<properties>
<property name="ignoreSpacesInComment" value="true"/>
</properties>
</rule>
<!-- Disable modern class name reference on objects (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference">
<properties>
<property name="enableOnObjects" value="false"/>
</properties>
</rule>
<!-- Disable usage of constructor property promotion (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<!-- Disable usage of null coalesce operator equal operator (PHP 7.4+) -->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<!-- Disable usage of null safe operator when possible (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<!-- Disable non-capturing catch when the variable with exception is not used (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<!-- Disable trailing commas in multiline function calls (PHP 7.3+) -->
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<!-- Disable trailing commas in multiline function declarations (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
<properties>
<property name="enableMixedTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableUnionTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableIntersectionTypeHint" value="false"/><!-- PHP 8.1+ -->
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/><!-- PHP 8.2+ -->
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<properties>
<property name="enableNativeTypeHint" value="false"/><!-- PHP 7.4+ -->
<property name="enableMixedTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableUnionTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableIntersectionTypeHint" value="false"/><!-- PHP 8.1+ -->
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/><!-- PHP 8.2+ -->
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
<properties>
<property name="enableStaticTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableMixedTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableUnionTypeHint" value="false"/><!-- PHP 8.0+ -->
<property name="enableIntersectionTypeHint" value="false"/><!-- PHP 8.1+ -->
<property name="enableNeverTypeHint" value="false"/><!-- PHP 8.1+ -->
<property name="enableStandaloneNullTrueFalseTypeHints" value="false"/><!-- PHP 8.2+ -->
</properties>
</rule>
<!-- Disable union type hint (PHP 8.0+) -->
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
<properties>
<property name="enable" value="false"/>
</properties>
</rule>
</ruleset>