-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
60 lines (47 loc) · 1.99 KB
/
phpcs.xml.dist
File metadata and controls
60 lines (47 loc) · 1.99 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
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0"?>
<ruleset name="PiperPHP">
<description>PiperPHP coding standard based on PSR-12 with Slevomat additions</description>
<!-- Scan src, examples, bin, and tests directories -->
<file>src</file>
<file>examples</file>
<file>bin</file>
<file>tests</file>
<!-- Exclude vendor and cache -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>*.cache</exclude-pattern>
<exclude-pattern>piper1-gpl/*</exclude-pattern>
<!-- Allow snake_case test method names in test files -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- Allow snake_case test method names in test files -->
<rule ref="PSR1.Methods.CamelCapsMethodName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- Use PSR-12 standard as base -->
<rule ref="PSR12"/>
<!-- Slevomat: Require strict_types=1 declaration -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<!-- Slevomat: Alphabetically sorted use statements -->
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<!-- Slevomat: No unused imports -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<!-- Slevomat: Require trailing comma in multi-line arrays -->
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<!-- Slevomat: Require null coalesce operator when possible -->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Show sniff codes in report -->
<arg value="s"/>
<!-- Use colors in output -->
<arg name="colors"/>
</ruleset>