-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
50 lines (43 loc) · 1.52 KB
/
phpcs.xml
File metadata and controls
50 lines (43 loc) · 1.52 KB
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
<?xml version="1.0"?>
<ruleset name="OpenCart Debug Panel Coding Standard">
<description>PSR-12 coding standard for OpenCart Debug Panel</description>
<!-- Show progress -->
<arg value="p"/>
<!-- Show sniff codes -->
<arg value="s"/>
<!-- Use colors -->
<arg name="colors"/>
<!-- Paths to check -->
<file>upload/</file>
<!-- Exclude patterns -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*.js</exclude-pattern>
<exclude-pattern>*.css</exclude-pattern>
<exclude-pattern>*.twig</exclude-pattern>
<!-- PSR-12 standard -->
<rule ref="PSR12">
<!-- OpenCart 3 doesn't use namespaces -->
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
</rule>
<!-- Line length -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="150"/>
</properties>
</rule>
<!-- This file mixes PHP and HTML — allow side effects -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>*/upload/*</exclude-pattern>
</rule>
<!-- Forbidden functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="eval" value="null"/>
<element key="die" value="null"/>
<element key="exit" value="null"/>
</property>
</properties>
</rule>
</ruleset>