<?xml version="1.0"?>
<ruleset
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
    name="OcramiusProxyManager"
>
    <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>./src</file>
    <file>./tests/language-feature-scripts</file>
    <file>./tests/ProxyManagerBench</file>
    <file>./tests/ProxyManagerTest</file>

    <rule ref="Doctrine">
        <exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
        <exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix"/>
        <exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix"/>

        <!-- we cannot enforce the " : void" return type hint due to BC compliance, for now -->
        <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>

        <!-- spaces after reference markers are wished and endorsed -->
        <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterReference"/>

        <!-- There isn't an `assert(...)` equivalent replacement of `/** @var class-string $foo */` due to side-effects of `class_exists()` -->
        <exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion.RequiredExplicitAssertion"/>

        <!-- `@param callable (?A, B) : C` is incorrectly recognized as nullable parameter in the first position of a callable -->
        <exclude name="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition.NullTypeHintNotOnLastPosition"/>

        <!-- `get_class($v)` is equivalent to `$v::class`, but this is not yet recognized by psalm -->
        <exclude name="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall"/>
    </rule>
</ruleset>
