1<?xml version="1.0"?>
2<ruleset
3    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4    xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
5>
6    <arg name="basepath" value="."/>
7    <arg name="extensions" value="php"/>
8    <arg name="parallel" value="80"/>
9    <arg name="cache" value=".phpcs-cache"/>
10    <arg name="colors"/>
11    <arg value="nps"/>
12
13    <file>src/</file>
14    <file>tests/</file>
15
16    <rule ref="Doctrine">
17        <exclude name="Generic.Formatting.SpaceAfterNot"/>
18        <exclude name="Generic.Formatting.MultipleStatementAlignment"/>
19
20        <exclude name="Squiz.Arrays.ArrayDeclaration.KeySpecified"/>
21        <exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
22
23        <exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
24        <exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
25
26        <exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison.DisallowedYodaComparison"/>
27        <exclude name="SlevomatCodingStandard.ControlStructures.AssignmentInCondition.AssignmentInCondition"/>
28        <exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
29
30        <exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment"/>
31
32    </rule>
33
34    <rule ref="SlevomatCodingStandard.ControlStructures.RequireYodaComparison"/>
35
36     <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations">
37        <properties>
38            <property
39                name="forbiddenAnnotations"
40                type="array"
41                value="
42                    @api,
43                    @category,
44                    @copyright,
45                    @created,
46                    @license,
47                    @package,
48                    @since,
49                    @subpackage,
50                    @version
51                "
52            />
53        </properties>
54    </rule>
55
56
57    <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
58        <properties>
59            <property name="allowFallbackGlobalConstants" type="boolean" value="true"/>
60            <property name="allowFallbackGlobalFunctions" type="boolean" value="true"/>
61            <property name="allowFullyQualifiedGlobalClasses" type="boolean" value="true"/>
62            <property name="allowFullyQualifiedGlobalConstants" type="boolean" value="true"/>
63            <property name="allowFullyQualifiedGlobalFunctions" type="boolean" value="true"/>
64            <property name="allowFullyQualifiedNameForCollidingClasses" type="boolean" value="false"/>
65            <property name="allowFullyQualifiedNameForCollidingConstants" type="boolean" value="false"/>
66            <property name="allowFullyQualifiedNameForCollidingFunctions" type="boolean" value="false"/>
67            <property name="searchAnnotations" type="boolean" value="true"/>
68        </properties>
69    </rule>
70
71     <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
72        <properties>
73            <property name="spacesCountBeforeColon" value="0"/>
74        </properties>
75    </rule>
76
77    <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
78        <exclude-pattern>tests/*</exclude-pattern>
79    </rule>
80
81    <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
82        <exclude-pattern>tests/*</exclude-pattern>
83    </rule>
84
85    <rule ref="PSR2.Classes.PropertyDeclaration.Multiple">
86        <exclude-pattern>tests/*</exclude-pattern>
87    </rule>
88
89    <rule ref="Squiz.Classes.ClassFileName.NoMatch">
90        <exclude-pattern>tests/*</exclude-pattern>
91    </rule>
92
93    <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
94        <exclude-pattern>tests/*</exclude-pattern>
95    </rule>
96    <rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
97        <exclude-pattern>tests/*</exclude-pattern>
98    </rule>
99
100</ruleset>
101