<?xml version="1.0"?>
<ruleset>
    <arg name="basepath" value="."/>
    <arg name="extensions" value="php"/>
    <arg name="parallel" value="80"/>
    <arg name="cache" value=".phpcs-cache"/>
    <arg name="colors"/>

    <!-- Ignore warnings and show progress of the run -->
    <arg value="nps"/>

    <config name="php_version" value="70200"/>

    <file>src</file>
    <file>tests</file>

    <rule ref="Doctrine">
        <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>
        <exclude name="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
    </rule>

    <!-- Disable the rules that will require PHP 7.4 -->
    <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
        <properties>
            <property name="enableNativeTypeHint" value="false"/>
        </properties>
    </rule>

    <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
        <exclude-pattern>src/*</exclude-pattern>
    </rule>

    <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
        <exclude-pattern>src/*</exclude-pattern>
    </rule>

    <rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>

    <rule ref="Squiz.Classes.ClassFileName.NoMatch">
        <exclude-pattern>tests/*</exclude-pattern>
    </rule>

    <rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
        <exclude-pattern>src/Persistence/AbstractManagerRegistry.php</exclude-pattern>
        <exclude-pattern>src/Persistence/Mapping/AbstractClassMetadataFactory.php</exclude-pattern>
    </rule>

    <rule ref="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix">
        <exclude-pattern>src/Persistence/Mapping/MappingException.php</exclude-pattern>
    </rule>
</ruleset>
