-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
71 lines (58 loc) · 2.79 KB
/
phpcs.xml.dist
File metadata and controls
71 lines (58 loc) · 2.79 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
70
71
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>The library's coding standard.</description>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<arg name="colors"/>
<!-- Ignore warnings and show progress of the run -->
<arg value="np"/>
<!-- PHP version to test against -->
<config name="php_version" value="80400"/>
<file>./app/src</file>
<file>./src</file>
<file>./tests</file>
<rule ref="Doctrine">
<!-- We actually want these prefixes and suffixes -->
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix"/>
<!-- No spacing around operators enforced, php-cs-fixer has this handled -->
<exclude name="Generic.Formatting.SpaceAfterNot"/>
<exclude name="PSR12.Operators.OperatorSpacing"/>
<exclude name="Squiz.Strings.ConcatenationSpacing.PaddingFound"/>
<!-- We actually want to use Yoda comparison -->
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<!-- Sometimes necessary to satisfy Psalm types -->
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable"/>
<!-- We don't want this -->
<exclude name="Generic.Formatting.MultipleStatementAlignment"/>
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment"/>
<!-- PHP-CS-Fixer has different rules -->
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectAnnotationsGroup"/>
</rule>
<!-- Align with php-cs-fixer config -->
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
<properties>
<property name="linesCountBetweenUseTypes" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
<properties>
<property name="forbiddenAnnotations" type="array">
<element value="@author"/>
<element value="@category"/>
<element value="@copyright"/>
<element value="@created"/>
<element value="@license"/>
<element value="@package"/>
<element value="@since"/>
<element value="@subpackage"/>
<element value="@version"/>
</property>
</properties>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>