-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.phpcs.xml.dist
43 lines (35 loc) · 1.56 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
<?xml version="1.0"?>
<ruleset name="assertwell/phpunit-global-state">
<description>Coding standards for assertwell/phpunit-global-state.</description>
<arg value="sp" />
<arg name="basepath" value="./" />
<arg name="colors" />
<arg name="extensions" value="php" />
<arg name="parallel" value="8" />
<!-- Only scan PHP files that belong to the app. -->
<file>src</file>
<file>tests</file>
<!-- Use PSR-12 as a base. -->
<rule ref="PSR12" />
<!-- The distributed code should be compatible with PHP 5.6 and newer. -->
<config name="testVersion" value="5.6-" />
<rule ref="PHPCompatibility" />
<!--
Each of the traits will likely have a private array property that contains the global data
to be restored, but we don't want to risk this conflicting with other properties that users
might define in their tests.
As a result, we'll use the convention of `private $_somePropertyName`, but the underscore is
*not* meant to indicate visibility, but rather to avoid conflict.
-->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<exclude-pattern>src/*.php</exclude-pattern>
</rule>
<!-- Test methods may use snake_case. -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>tests</exclude-pattern>
</rule>
<!-- Don't require visibility on constants, as that's unsupported in PHP 7.0. -->
<rule ref="PSR12.Properties.ConstantVisibility.NotFound">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>