Repository navigation
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
48 lines (37 loc) · 1.57 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
48 lines (37 loc) · 1.57 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
<?xml version="1.0"?>
<ruleset name="TikvClient">
<description>TiKV PHP client coding standard based on PSR-12 with Slevomat additions</description>
<!-- Scan src/Client, phpstan and tests directories (exclude auto-generated Proto) -->
<file>src/Client</file>
<file>phpstan</file>
<file>tests</file>
<!-- Exclude vendor and cache -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>*.cache</exclude-pattern>
<!-- 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>