From 60f82bfc8889dc5ef913faf20d33c1f5469faa79 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 4 Jul 2023 08:35:19 +0900 Subject: [PATCH] chore: skip RemoveAlwaysTrueIfConditionRector for AutoRouterImproved --- rector.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rector.php b/rector.php index 1532d33471a3..041fa6f33082 100644 --- a/rector.php +++ b/rector.php @@ -28,6 +28,7 @@ use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; +use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; @@ -118,6 +119,11 @@ ], SimplifyRegexPatternRector::class, + + RemoveAlwaysTrueIfConditionRector::class => [ + // false positive. @TODO remove if Rector is fixed. + __DIR__ . '/system/Router/AutoRouterImproved.php', + ], ]); // auto import fully qualified class names