-
Notifications
You must be signed in to change notification settings - Fork 12
/
phpcs.xml.dist
89 lines (70 loc) · 3.14 KB
/
phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset
name="PHPComplex"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<description>The code standard for PHPComplex is PSR2.</description>
<!-- ##### Coding Standard check #####-->
<rule ref="PSR2"/>
<!--
#############################################################################
COMMAND LINE ARGUMENTS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
#############################################################################
-->
<!-- Check all files in this directory and the directories below it. -->
<file>.</file>
<!-- Do not check the vendor directory. -->
<exclude-pattern>/vendor/*</exclude-pattern>
<!-- Show progress & sniff codes. -->
<arg value="ps"/>
<!-- Only check PHP files. -->
<arg name="extensions" value="php"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<!-- Check up to 8 files simultanously. -->
<arg name="parallel" value="8"/>
<!--
#############################################################################
RULESETS
#############################################################################
-->
<!-- ##### Check PHP cross-version compatibility ##### -->
<rule ref="PHPCompatibility" />
<config name="testVersion" value="7.2"/>
<!--
#############################################################################
CUSTOMIZATIONS
#############################################################################
-->
<!-- Warn about lines longer than 132 chars, and error for lines longer than 155 chars. -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="132" />
<property name="absoluteLineLimit" value="155" />
</properties>
</rule>
<!--
#############################################################################
SELECTIVE EXCEPTIONS
#############################################################################
-->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<!-- Don't break BC for integrations by renaming the autoloader methods. Not worth it. -->
<exclude-pattern>/classes/Autoloader\.php$</exclude-pattern>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration">
<!-- Don't break BC for integrations by renaming the autoloader methods. Not worth it. -->
<exclude-pattern>/classes/Bootstrap\.php$</exclude-pattern>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<!-- Exempt the bootstrap files from the side-effects rule. -->
<exclude-pattern>/classes/Bootstrap\.php$</exclude-pattern>
<exclude-pattern>/unitTests/bootstrap\.php$</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>/unitTests/classes/src/functions/*Test\.php$</exclude-pattern>
<exclude-pattern>/unitTests/classes/src/operations/*Test\.php$</exclude-pattern>
</rule>
</ruleset>