-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs_custom_ruleset.xml
More file actions
118 lines (104 loc) · 6.01 KB
/
phpcs_custom_ruleset.xml
File metadata and controls
118 lines (104 loc) · 6.01 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
<?xml version="1.0"?>
<ruleset name="Shred Standard">
<rule ref="PSR2" />
<rule ref="src/Module/CodingStandard" />
<rule ref="vendor/escapestudios/symfony2-coding-standard/Symfony">
<exclude name="Symfony.Commenting.ClassComment"/>
<exclude name="Symfony.Commenting.FunctionComment"/>
<exclude name="Symfony.Functions.ScopeOrder"/>
<exclude name="Symfony.Functions.Arguments"/>
<exclude name="Symfony.ControlStructure.YodaConditions"/>
<exclude name="Symfony.NamingConventions.ValidClassName"/>
<exclude name="Symfony.Commenting.License"/>
<exclude name="Zend.NamingConventions.ValidVariableName.MemberVarContainsNumbers" />
</rule>
<!-- Line length limit -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="170"/>
<property name="absoluteLineLimit" value="170"/>
</properties>
</rule>
<rule ref="Generic.Files.LineLength.MaxExceeded">
<message>Line contains %2$s chars, which is more than the limit of %1$s</message>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
<message>Line longer than %s characters; contains %s characters</message>
</rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard">
<exclude name="SlevomatCodingStandard.Classes.ClassStructure"/> <!-- need to slightly change the order of the methods -->
<exclude name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
<exclude name="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming"/>
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
<exclude name="SlevomatCodingStandard.Commenting.DisallowCommentAfterCode" />
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment"/>
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing"/>
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment"/>
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowEmpty"/>
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison"/>
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName"/>
<exclude name="SlevomatCodingStandard.Functions.DisallowArrowFunction"/>
<exclude name="SlevomatCodingStandard.Functions.TrailingCommaInCall"/>
<exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/>
<exclude name="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator"/>
<exclude name="SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator"/>
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators"/>
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion"/>
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
<exclude name="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax"/>
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
<property name="ignoredAnnotations" type="array" value="@group"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Files.LineLength">
<properties>
<property name="lineLengthLimit" value="170"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature">
<properties>
<property name="minLineLength" value="170"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Whitespaces.DuplicateSpaces">
<properties>
<property name="ignoreSpacesInAnnotation" value="true"/>
</properties>
</rule>
<!-- excluded unused private elements rule for entities -->
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
<exclude-pattern>src/*/Entity/*\.php</exclude-pattern>
</rule>
<!-- excluded "does not have native type hint rule" for commands -->
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<exclude-pattern>src/*/Command/*(Command|Trait)\.php</exclude-pattern>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="spacingBeforeFirst" value="0"/>
<property name="spacingAfterLast" value="0"/>
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
</ruleset>