-
Notifications
You must be signed in to change notification settings - Fork 4
/
phpcs.xml
95 lines (71 loc) · 3.12 KB
/
phpcs.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="willow-rulset">
<file>./app</file>
<file>./public</file>
<file>./config</file>
<!-- Explicitly ignore tests -->
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Explicitly ignore the vendor directory -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- All of PSR-2: http://www.php-fig.org/psr/psr-2/ -->
<rule ref="PSR2">
<!-- Allow beginning brace on the same line for functions -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
</rule>
<!-- Enforce functions have starting braces on the same line -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie">
<properties>
<property name="checkFunctions" value="true" />
<property name="checkClosures" value="true" />
</properties>
</rule>
<!-- No empty bodies for control structures, etc. -->
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<!-- No unconditional if statements (if (true)) -->
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<!-- No useless overrides that just call the parent method. -->
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<!-- No TODOs or FIXMEs in comments. -->
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Commenting.Fixme"/>
<!-- Control structures must have braces. -->
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<!-- Deprecated php functions not allowed. -->
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<!-- No use of alias functions like sizeof() -->
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<!-- No unnecessary string concatenation. -->
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<!-- No use of the @ operator to suppress errors. -->
<rule ref="Generic.PHP.NoSilencedErrors">
<properties>
<property name="error" value="true"/>
</properties>
</rule>
<!-- No # comments -->
<rule ref="PEAR.Commenting.InlineComment"/>
<!-- Proper spacing around operators -->
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<!-- No commented out code. -->
<rule ref="Squiz.PHP.CommentedOutCode"/>
<!-- Warns when eval() is used. -->
<rule ref="Squiz.PHP.Eval"/>
<!-- No global keyword. -->
<rule ref="Squiz.PHP.GlobalKeyword"/>
<!-- Warns about code that can never execute. -->
<rule ref="Squiz.PHP.NonExecutableCode"/>
<!-- No use of $this in static methods. -->
<rule ref="Squiz.Scope.StaticThisUsage"/>
<!-- No whitespace inside cast statement. -->
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<!-- Language constructs only have one space between them. -->
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<!-- No whitespace before semicolon -->
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<!-- No superfluous whitespace. -->
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
</properties>
</rule>
</ruleset>