parameters:
    sets:
        - dead-code

    paths:
        - app/bundles
        - plugins

    exclude_paths:
        - '*/tests/*'
        - '*/Tests/*'
        - '*/Test/*'
        - '*/test/*'
        - '*/InstallFixtures/*'
        - '*/Fixtures/*'
        - '*.html.php'
        - '*.inc.php'
        - '*.js.php'
        - 'app/bundles/LeadBundle/Entity/LeadField.php' # Rector doesn't understand the lifecycle method.
        - 'app/bundles/WebhookBundle/Entity/Webhook.php' # Rector doesn't understand the JMS serialization hacks.
        - 'app/bundles/UserBundle/Entity/UserToken.php' # Rector doesn't understand the private prop $id is useful there.
        - 'app/bundles/EmailBundle/Entity/EmailReplyRepository.php' # Method getTableAlias() is called only from the trait. Bad, bad. Excluding for now.

    exclude_rectors:
        - 'Rector\DeadCode\Rector\ClassMethod\RemoveUnusedParameterRector' # Causes BC breaks and broken services. Use only manually with caution.
        - 'Rector\DeadCode\Rector\MethodCall\RemoveDefaultArgumentValueRector' # Doesn't play nicely every time.
        - 'Rector\DeadCode\Rector\If_\SimplifyIfElseWithSameContentRector' # Removes code that is not the same.
        - 'Rector\DeadCode\Rector\For_\RemoveDeadIfForeachForRector' # Problematic with some copy-pasted code.
        - 'Rector\DeadCode\Rector\Ternary\TernaryToBooleanOrFalseToBooleanAndRector' # see https://github.com/rectorphp/rector/issues/2765
        - 'Rector\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector' # see https://github.com/rectorphp/rector/issues/2730
