-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
112 lines (98 loc) · 4.68 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
<?xml version="1.0"?>
<ruleset>
<config name="installed_paths" value="vendor/slevomat/coding-standard"/>
<arg name="basepath" value="."/>
<arg name="tab-width" value="4"/>
<arg name="parallel" value="75" />
<arg value="np"/>
<file>./src</file>
<file>./tests</file>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<rule ref="SlevomatCodingStandard">
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException"/>
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment"/>
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostDecrementOperator"/>
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator"/>
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint"/>
<exclude name="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn.UselessIfCondition"/>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="enableObjectTypeHint" value="true"/>
<property name="usefulAnnotations" type="array">
<element value="@dataProvider"/>
</property>
<property name="traversableTypeHints" type="array">
<element value="\Amp\Promise"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="HarmonyIO\Framework"/>
<element key="tests" value="HarmonyIO\FrameworkTest"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
<property name="linesCountBeforeClosingBrace" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="searchAnnotations" value="true"/>
<property name="allowFullyQualifiedGlobalClasses" value="true"/>
<property name="allowFallbackGlobalFunctions" value="true"/>
<property name="allowFallbackGlobalConstants" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing">
<properties>
<property name="tokensToCheck" type="array">
<element value="T_DO"/>
<element value="T_IF"/>
<element value="T_SWITCH"/>
<element value="T_GOTO"/>
<element value="T_SWITCH"/>
<element value="T_THROW"/>
<element value="T_TRY"/>
</property>
</properties>
</rule>
<rule ref="PSR2">
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
</rule>
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Room11\Jeeves"/>
<element key="tests" value="Room11\JeevesTest"/>
</property>
</properties>
</rule>
</ruleset>