-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
60 lines (48 loc) · 1.8 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
<?xml version="1.0"?>
<ruleset name="Digital Peak">
<description>The Digital Peak coding standard, based on PSR-2.</description>
<rule ref="PSR2">
<!-- Use tabs -->
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- Allow none namespaced classes -->
<exclude name="PSR1.Classes.ClassDeclaration"/>
<!-- Allow code in classes like class check on top -->
<exclude name="PSR1.Files.SideEffects"/>
<!-- Allow else if -->
<exclude name="PSR2.ControlStructures.ElseIfDeclaration"/>
<!-- Allow brace on same line -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
</rule>
<!-- Use tabs instead of spaces -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
<!-- Allow line length 150 -->
<rule ref="Generic.Files.LineLength">
<properties>
<!-- We are tolerant here -->
<property name="lineLimit" value="1500"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
<!-- Else if divided -->
<rule ref="Squiz.ControlStructures.ElseIfDeclaration"/>
<!-- Short arrays -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<!-- Brace on same line -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<!-- Strict documents -->
<!-- <rule ref="Generic.Commenting.DocComment"/> -->
<!-- Excludes -->
<exclude-pattern>*/docs/*</exclude-pattern>
<exclude-pattern>*/public/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/storage/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>**/*.js</exclude-pattern>
<exclude-pattern>**/*.vue</exclude-pattern>
</ruleset>