-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml.dist
146 lines (135 loc) · 6.31 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
<?xml version="1.0"?>
<ruleset name="TalentFlux" namespace="Flux\CS\Standard">
<description>Talentify Code Standard</description>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg name="parallel" value="80"/>
<!-- Show sniff codes in all reports and show progress of the run -->
<arg value="sp"/>
<file>app/</file>
<file>tests/</file>
<!-- Exclude files generated by codeception -->
<exclude-pattern>tests/_support/_generated/</exclude-pattern>
<!-- Include from relative path from PHPCS source location -->
<config name="installed_paths" value="../../slevomat/coding-standard/SlevomatCodingStandard,../../object-calisthenics/phpcs-calisthenics-rules/src/ObjectCalisthenics"/>
<!-- Include from path -->
<!--<rule ref="vendor/foo/bar/ruleset.xml" />-->
<!--
#TODO
Squiz.Strings.DoubleQuoteUsage.ContainsVar
no docblock sempre usar referencia completa
tamanho de variável
-->
<!-- PSR2 -->
<rule ref="PSR2" />
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
</rule>
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
</rule>
<!-- Miscellaneous #TODO tá funcionando? -->
<rule ref="Generic.Commenting.Todo.CommentFound">
<message>Please review this TODO comment: %s</message>
<severity>3</severity>
</rule>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="delete=>unset,echo=>print,create_function=>null" />
</properties>
</rule>
<rule ref="Generic.Files.LineLength.TooLong">
</rule>
<!-- Slevomat Coding Standard -->
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration" >
<properties>
<property name="usefulAnnotations" type="array"
value="@throws,@see,@link,@dataProvider,@covers,@deprecated,@Then,@When,@Given"/>
<property name="allAnnotationsAreUseful" type="array"
value="@throws,@see,@link,@dataProvider,@covers,@deprecated,@Then,@When,@Given"/>
</properties>
<exclude-pattern>app/Model/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators">
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
</rule>
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
<rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/>
<rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility">
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
<properties>
<property name="spacesCountBeforeColon" value="1"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
<rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
<property name="linesCountBeforeClosingBrace" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array" value="@author,@created,@version,@package"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments">
<properties>
<property name="forbiddenCommentPatterns" type="array"
value="'Created by PhpStorm','User:','Date:','Time:'"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
<!-- Object Calisthenics -->
<!-- Rule 7: Keep your classes small -->
<rule ref="ObjectCalisthenics.Files.ClassTraitAndInterfaceLength">
<properties>
<property name="maxLength" value="300"/>
</properties>
</rule>
<rule ref="ObjectCalisthenics.Files.FunctionLength">
<properties>
<property name="maxLength" value="35"/>
</properties>
</rule>
<rule ref="ObjectCalisthenics.Files.FunctionLength.ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff">
</rule>
<rule ref="ObjectCalisthenics.Metrics.PropertyPerClassLimit">
<properties>
<property name="maxCount" value="10"/>
</properties>
</rule>
<rule ref="ObjectCalisthenics.Metrics.PropertyPerClassLimit.ObjectCalisthenics\Sniffs\Metrics\PropertyPerClassLimitSniff">
</rule>
<rule ref="ObjectCalisthenics.Metrics.MethodPerClassLimit">
<properties>
<property name="maxCount" value="15"/>
</properties>
</rule>
</ruleset>