-
Notifications
You must be signed in to change notification settings - Fork 75
/
phpcs.xml.dist
52 lines (42 loc) · 2.08 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
<?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"/>
<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"/>
</rule>
<!-- Align with php-cs-fixer config -->
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
<properties>
<property name="linesCountBetweenUseTypes" value="0"/>
</properties>
</rule>
<!-- <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">-->
<!-- <exclude-pattern>*/tests/*</exclude-pattern>-->
<!-- </rule>-->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>