-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathruleset.xml
78 lines (61 loc) · 2.88 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
<?xml version="1.0"?>
<ruleset name="TMOU">
<description>TMOU code standard customized PSR-1 and PSR-2 standard</description>
<!-- Make additional rulesets available (relative path from PHPCS source location) -->
<config name="installed_paths" value="../../slevomat/coding-standard/"/>
<!-- Inherit rules from PSR-2 but ignore some of them according to current team agreement. -->
<rule ref="PSR2"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="205"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<!-- Force declare(strict_types=1); right after <?php -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="true"/>
<property name="linesCountBeforeDeclare" value="0"/>
<property name="linesCountAfterDeclare" value="0"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<!-- Force short array syntax -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<!-- Force trailing comma in arrays -->
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<!-- Ban some deprecated or dangerous functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="sizeof=>count,delete=>unset,print=>echo,is_null=>null,create_function=>null,empty=>null" />
</properties>
</rule>
<!-- Force all constants to have properly configured visibility. -->
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<!-- Force all exception to be stated in fully qualified names. -->
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
<!-- Prohibit multiple uses per one line. -->
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
<!-- Prevent some annotations as ve have the version control -->
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property type="array" name="forbiddenAnnotations" value="
@author,
@created,
@copyright,
@license,
@package,
@version" />
</properties>
</rule>
<!-- Prevent assignment in conditions -->
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
<!-- Prevent Yoda conditions -->
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<!-- Prevent unused uses -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" type="boolean" value="true" />
</properties>
</rule>
</ruleset>