-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
59 lines (50 loc) · 2.19 KB
/
phpcs.xml
File metadata and controls
59 lines (50 loc) · 2.19 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
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="PHP_CodeSniffer"
xsi:noNamespaceSchemaLocation="vendor-bin/phpcs/vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<description>Custom coding standard for PHP_CodeSniffer</description>
<!-- Check for cross-version support for PHP 8.1 to 8.3 -->
<config name="testVersion" value="8.1-8.3"/>
<!-- Paths to check -->
<file>.</file>
<!-- Paths to ignore recursively -->
<exclude-pattern>.vscode/**</exclude-pattern>
<exclude-pattern>var/**</exclude-pattern>
<exclude-pattern>vendor/**</exclude-pattern>
<exclude-pattern>vendor-bin/**</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="cache" value="var/cache/.phpcs.cache"/>
<arg name="colors"/>
<arg name="parallel" value="2"/>
<arg name="report" value="full,summary,source"/>
<!-- Show sniff error codes in all reports -->
<arg value="s"/>
<!-- Run against the PHPCompatibility ruleset -->
<rule ref="PHPCompatibility"/>
<!-- Include the whole PSR-12 standard -->
<rule ref="PSR12">
<!-- Let php-cs-fixer handle PER-CS: single_line_empty_body -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
</rule>
<!-- Include some sniffs from other standards that don't conflict with PSR-12 -->
<rule ref="SlevomatCodingStandard.Classes.RequireAbstractOrFinal.ClassNeitherAbstractNorFinal"/>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
<rule ref="Zend.NamingConventions.ValidVariableName.ContainsNumbers"/>
<rule ref="Zend.NamingConventions.ValidVariableName.MemberVarContainsNumbers"/>
<rule ref="Zend.NamingConventions.ValidVariableName.StringVarContainsNumbers"/>
<!-- Lines can be 80 chars long, show errors at 120 chars -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="80"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
</ruleset>