-
Notifications
You must be signed in to change notification settings - Fork 3
/
phpcs.xml.dist
54 lines (44 loc) · 2.07 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
44
45
46
47
48
49
50
51
52
53
54
<?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=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Paths to check -->
<file>config</file>
<file>src</file>
<file>tests</file>
<exclude-pattern>config/config.php</exclude-pattern>
<exclude-pattern>config/routes.php</exclude-pattern>
<!-- phpcs refuses to fix this file or even say what the errors are, so screw you phpcs -->
<exclude-pattern>src/Factories/GuzzleClientFactory.php</exclude-pattern>
<!-- Include all rules from the PSR-12 Coding Standard -->
<rule ref="PSR12"/>
<!-- Include all rules from the Laminas Coding Standard -->
<rule ref="LaminasCodingStandard">
<!-- Allow long lines -->
<exclude name="Generic.Files.LineLength.TooLong" />
<!-- Allow PHP standard functions to be called without importing -->
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName"/>
<exclude name="WebimpressCodingStandard.NamingConventions.AbstractClass"/>
</rule>
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>src/ConfigProvider.*.php</exclude-pattern>
</rule>
<rule ref="PSR12.Files.FileHeader.IncorrectOrder">
<exclude-pattern>config/pipeline.php</exclude-pattern>
<exclude-pattern>src/MezzioInstaller/Resources/config/routes-*.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="declareOnFirstLine" value="0" />
<property name="linesCountBeforeDeclare" value="1" />
<property name="linesCountAfterDeclare" value="1" />
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
</ruleset>