|
30 | 30 | use Rector\DeadCode\Rector\Cast\RecastingRemovalRector; |
31 | 31 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
32 | 32 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; |
33 | | -use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; |
34 | | -use Rector\DeadCode\Rector\Expression\RemoveDeadStmtRector; |
| 33 | +use Rector\DeadCode\Rector\If_\RemoveUnusedNonEmptyArrayBeforeForeachRector; |
35 | 34 | use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; |
36 | 35 | use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector; |
37 | | -use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; |
38 | 36 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
39 | 37 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
40 | 38 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
|
78 | 76 | // requires php 8 |
79 | 77 | RemoveUnusedPromotedPropertyRector::class, |
80 | 78 |
|
81 | | - // currently buggy on call inside assign, wait for next release |
82 | | - RemoveParentCallWithoutParentRector::class, |
83 | | - |
84 | 79 | // private method called via getPrivateMethodInvoker |
85 | 80 | RemoveUnusedPrivateMethodRector::class => [ |
86 | 81 | __DIR__ . '/system/Entity/Entity.php', |
|
92 | 87 | __DIR__ . '/tests', |
93 | 88 | ], |
94 | 89 |
|
95 | | - // currently buggy on class implements ArrayAccess, wait for next release |
96 | | - RemoveDeadStmtRector::class => [ |
97 | | - __DIR__ . '/tests/system/Cookie/CookieTest.php', |
98 | | - ], |
99 | | - |
100 | 90 | // check on constant compare |
101 | 91 | UnwrapFutureCompatibleIfPhpVersionRector::class => [ |
102 | 92 | __DIR__ . '/system/CodeIgniter.php', |
103 | 93 | ], |
104 | 94 |
|
105 | | - // check context ResponseTrait |
106 | | - RemoveUselessReturnTagRector::class => [ |
107 | | - __DIR__ . '/system/HTTP/MessageTrait.php', |
108 | | - ], |
109 | | - |
110 | 95 | // casted to Entity via EntityTest->getCastEntity() |
111 | 96 | RecastingRemovalRector::class => [ |
112 | 97 | __DIR__ . '/tests/system/Entity/EntityTest.php', |
|
116 | 101 | UnderscoreToCamelCaseVariableNameRector::class => [ |
117 | 102 | __DIR__ . '/system/Session/Handlers', |
118 | 103 | ], |
| 104 | + |
| 105 | + // check on $_SESSION |
| 106 | + RemoveUnusedNonEmptyArrayBeforeForeachRector::class => [ |
| 107 | + __DIR__ . '/system/Debug/Toolbar.php', |
| 108 | + ], |
119 | 109 | ]); |
120 | 110 |
|
121 | 111 | // auto import fully qualified class names |
|
0 commit comments