-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml
More file actions
69 lines (63 loc) · 2.53 KB
/
Copy pathphpcs.xml
File metadata and controls
69 lines (63 loc) · 2.53 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
61
62
63
64
65
66
67
68
69
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<arg name="basepath" value="."/>
<arg name="cache" value="var/phpcs.cache"/>
<file>src/</file>
<file>tests/</file>
<!-- backward compatibility shims, multiple namespaces and class_alias -->
<exclude-pattern>src/functions.php</exclude-pattern>
<config name="installed_paths" value="vendor/slevomat/coding-standard,vendor/shipmonk/coding-standard"/>
<rule ref="ShipMonkCodingStandard">
<!-- tabs instead of spaces -->
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- allow PHPUnit annotations -->
<exclude name="SlevomatCodingStandard.Commenting.ForbiddenAnnotations"/>
<!-- public API: TextIterator::NoSetup, KeepEmptyLine, ... -->
<exclude name="Generic.NamingConventions.UpperCaseConstantName"/>
<!-- public API: Time::time(), Interval::interval(), no PHP4 constructors in PHP 8 -->
<exclude name="Generic.NamingConventions.ConstructorName"/>
<!-- Gps returns [0 => lat, 1 => long, 'lat' => ..., 'long' => ...] by design -->
<exclude name="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>
</rule>
<!-- helper functions for iterator tests -->
<rule ref="Squiz.Functions.GlobalFunction">
<exclude-pattern>tests/src/Unit/Iterators/bootstrap.php</exclude-pattern>
</rule>
<!-- ForbiddenAnnotations without PHPUnit annotations -->
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array">
<element value="@author"/>
<element value="@copyright"/>
<element value="@internal-allowed-path"/>
<element value="@internal-allowed-scope"/>
<element value="@license"/>
<element value="@link"/>
<element value="@package"/>
<element value="@phpstan-extends"/>
<element value="@phpstan-implements"/>
<element value="@phpstan-param"/>
<element value="@phpstan-return"/>
<element value="@phpstan-template"/>
<element value="@phpstan-var"/>
<element value="@psalm-param"/>
<element value="@psalm-return"/>
<element value="@psalm-template"/>
<element value="@psalm-type"/>
<element value="@psalm-var"/>
<element value="@since"/>
<element value="@version"/>
</property>
</properties>
</rule>
<!-- tabs instead of spaces -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="tabIndent" value="true"/>
</properties>
</rule>
</ruleset>