-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
69 lines (56 loc) · 2.44 KB
/
phpcs.xml.dist
File metadata and controls
69 lines (56 loc) · 2.44 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 name="SimplyBook.me – PSR12 + PSR4 (Slevomat)">
<description>PSR-12 formatting and PSR-4-ish checks using Slevomat. No WordPress sniffs.</description>
<!-- Scope -->
<file>app</file>
<file>bootstrap</file>
<file>simplybook.php</file>
<!-- Ignore third-party / generated -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<!-- Ignore legacy or external code -->
<exclude-pattern>app/Traits/LegacyLoad.php</exclude-pattern>
<exclude-pattern>app/Traits/LegacySave.php</exclude-pattern>
<exclude-pattern>app/Http/ApiClient.php</exclude-pattern>
<!-- Runner args -->
<arg name="encoding" value="utf-8"/>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<!-- Tokenizer/env -->
<config name="php_version" value="70400"/>
<!-- Base standard -->
<rule ref="PSR12"/>
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"/>
</rule>
<!--Trust that developers will do this properly at their own discretion -->
<rule ref="Generic.Files.LineLength">
<exclude name="Generic.Files.LineLength.TooLong"/>
</rule>
<!-- Slevomat: PSR-4 filename↔type + namespace hygiene -->
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="app" value="SimplyBook"/>
<element key="bootstrap" value="SimplyBook\Bootstrap"/>
</property>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceDeclaration"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
<!-- Let Slevomat treat PHPDoc/annotations as valid usages -->
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<!-- Side-effects guard; excluding front controller/bootstrapper -->
<rule ref="PSR1.Files.SideEffects">
<exclude-pattern>simplybook.php</exclude-pattern>
</rule>
<!-- PHPCompatibility: -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.4-8.3"/>
</ruleset>