-
Notifications
You must be signed in to change notification settings - Fork 5
/
phpcs.xml
46 lines (35 loc) · 1.42 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
<?xml version="1.0"?>
<ruleset name="Globalis">
<description>Globalis coding standards</description>
<!-- Scan all files in directory -->
<file>./src/</file>
<file>./tests/</file>
<file>./RoboFile.php</file>
<!-- Scan only PHP files -->
<arg name="extensions" value="php"/>
<!-- Ignore dependencies -->
<exclude-pattern>./server/vendor/</exclude-pattern>
<!-- Show colors in console -->
<arg value="-colors"/>
<!-- Show sniff codes in all reports -->
<arg value="ns"/>
<!-- Use PSR-12 as a base -->
<rule ref="PSR12"/>
<!-- Custom rule: disallow long `array()` syntax, use short `[]` syntax instead -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.Files.LineEndings" />
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="var_dump=>NULL,sizeof=>count,delete=>unset,print=>echo,die=>exit,create_function=>NULL"/>
</properties>
</rule>
<rule ref="Squiz.PHP.Eval"/>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>./RoboFile.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>.*/loadTasks.php</exclude-pattern>
</rule>
</ruleset>