-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruleset.xml
81 lines (76 loc) · 5.17 KB
/
ruleset.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
<?xml version="1.0"?>
<ruleset name="ReservioCodingStandard">
<description>A Reservio coding standard.</description>
<arg name="tab-width" value="4"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.EndFileNewline"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="160"/>
<property name="absoluteLineLimit" value="160"/>
</properties>
</rule>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting. -->
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="ignoreIndentationTokens" type="array" value="T_COMMENT,T_DOC_COMMENT_OPEN_TAG"/>
</properties>
</rule>
<rule ref="PSR2">
<exclude name="PSR2.Classes.ClassDeclaration.CloseBraceAfterBody"/>
</rule>
<!-- Use Slevomat code standard -->
<rule ref="SlevomatCodingStandard">
<exclude name="Generic.Commenting.Todo.CommentFound"/>
<exclude name="Generic.Commenting.Todo.TaskFound"/>
<exclude name="Generic.NamingConventions.UpperCaseConstantName"/>
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing.IncorrectLinesCountAfterLastUse"/>
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDescriptionAndAnnotations"/>
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDifferentAnnotationsTypes"/>
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment"/>
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterControlStructure"/>
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountBeforeControlStructure"/>
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountBeforeFirstControlStructure"/>
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowEmpty.DisallowedEmpty"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.EarlyExitNotUsed"/>
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.UselessElse"/>
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses"/>
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator.MultiLineTernaryOperatorNotUsed"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator.TernaryOperatorNotUsed"/>
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison.RequiredYodaComparison"/>
<exclude name="SlevomatCodingStandard.Functions.StaticClosure.ClosureNotStatic"/>
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/>
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator"/>
<exclude name="SlevomatCodingStandard.PHP.ShortList.LongListUsed"/>
<exclude name="SlevomatCodingStandard.PHP.TypeCast.InvalidCastUsed"/>
<exclude name="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition.NullTypeHintNotOnLastPosition"/>
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturn"/><!-- throws error with short type hint for integer and boolean -->
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName"/><!-- throws error with short type hint for integer and boolean -->
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFullyQualifiedExceptions" type="boolean" value="true"/>
<property name="ignoredNames" type="array" value="DateTime,Mockery"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" type="bool" value="true"/>
</properties>
</rule>
</ruleset>