|
24 | 24 | use Rector\Config\RectorConfig; |
25 | 25 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; |
26 | 26 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
27 | | -use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; |
28 | 27 | use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector; |
29 | 28 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
30 | 29 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
31 | 30 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
32 | 31 | use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector; |
33 | 32 | use Rector\Php70\Rector\FuncCall\RandomFunctionRector; |
34 | | -use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector; |
35 | 33 | use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; |
36 | 34 | use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; |
37 | 35 | use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; |
38 | 36 | use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
39 | 37 | use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector; |
40 | 38 | use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector; |
| 39 | +use Rector\PostRector\Rector\UnusedImportRemovingPostRector; |
41 | 40 | use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector; |
42 | 41 | use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; |
43 | 42 | use Rector\Renaming\Rector\ConstFetch\RenameConstantRector; |
|
96 | 95 |
|
97 | 96 | RemoveUnusedPrivateMethodRector::class => [ |
98 | 97 | // private method called via getPrivateMethodInvoker |
99 | | - __DIR__ . '/tests/system/Test/ReflectionHelperTest.php', |
100 | 98 | __DIR__ . '/tests/_support/Test/TestForReflectionHelper.php', |
101 | 99 | ], |
102 | 100 |
|
103 | 101 | RemoveUnusedConstructorParamRector::class => [ |
104 | | - // there are deprecated parameters |
105 | | - __DIR__ . '/system/Debug/Exceptions.php', |
106 | | - // @TODO remove if deprecated $httpVerb is removed |
107 | | - __DIR__ . '/system/Router/AutoRouterImproved.php', |
108 | | - // @TODO remove if deprecated $config is removed |
109 | | - __DIR__ . '/system/HTTP/Request.php', |
110 | 102 | __DIR__ . '/system/HTTP/Response.php', |
111 | 103 | ], |
112 | 104 |
|
|
115 | 107 | __DIR__ . '/tests/system/Debug/ToolbarTest.php', |
116 | 108 | ], |
117 | 109 |
|
118 | | - // check on constant compare |
119 | | - UnwrapFutureCompatibleIfPhpVersionRector::class => [ |
120 | | - __DIR__ . '/system/Autoloader/Autoloader.php', |
121 | | - ], |
122 | | - |
123 | 110 | UnderscoreToCamelCaseVariableNameRector::class => [ |
124 | 111 | // session handlers have the gc() method with underscored parameter `$max_lifetime` |
125 | 112 | __DIR__ . '/system/Session/Handlers', |
|
130 | 117 | __DIR__ . '/app', |
131 | 118 | __DIR__ . '/system/CodeIgniter.php', |
132 | 119 | __DIR__ . '/system/Config/BaseConfig.php', |
133 | | - __DIR__ . '/system/Commands/Generators/Views', |
134 | | - __DIR__ . '/system/Pager/Views', |
135 | 120 | __DIR__ . '/system/Test/ControllerTestTrait.php', |
136 | | - __DIR__ . '/system/Validation/Views', |
137 | 121 | __DIR__ . '/system/View/Parser.php', |
138 | 122 | __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
139 | 123 | ], |
|
149 | 133 | __DIR__ . '/system/Filters/Filters.php', |
150 | 134 | __DIR__ . '/system/HTTP/CURLRequest.php', |
151 | 135 | __DIR__ . '/system/HTTP/DownloadResponse.php', |
152 | | - __DIR__ . '/system/HTTP/IncomingRequest.php', |
153 | 136 | __DIR__ . '/system/Security/Security.php', |
154 | 137 | __DIR__ . '/system/Session/Session.php', |
155 | 138 | ], |
156 | 139 |
|
157 | 140 | ReturnNeverTypeRector::class => [ |
158 | | - __DIR__ . '/system/Cache/Handlers/BaseHandler.php', |
159 | | - __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php', |
160 | | - __DIR__ . '/system/Cache/Handlers/WincacheHandler.php', |
161 | 141 | __DIR__ . '/system/CodeIgniter.php', |
162 | 142 | __DIR__ . '/system/Database/MySQLi/Utils.php', |
163 | 143 | __DIR__ . '/system/Database/OCI8/Utils.php', |
|
166 | 146 | __DIR__ . '/system/Database/SQLite3/Utils.php', |
167 | 147 | __DIR__ . '/system/HTTP/DownloadResponse.php', |
168 | 148 | __DIR__ . '/system/HTTP/SiteURI.php', |
169 | | - __DIR__ . '/system/Helpers/kint_helper.php', |
170 | | - __DIR__ . '/tests/_support/Autoloader/FatalLocator.php', |
171 | 149 | ], |
172 | 150 |
|
173 | 151 | // Unnecessary (string) is inserted |
|
197 | 175 | __DIR__ . '/tests/system/Models', |
198 | 176 | ], |
199 | 177 |
|
200 | | - StaticCallOnNonStaticToInstanceCallRector::class => [ |
201 | | - __DIR__ . '/tests/_support/Config/Services.php', |
| 178 | + UnusedImportRemovingPostRector::class => [ |
| 179 | + // buggy on auto import removed |
| 180 | + __DIR__ . '/system/HTTP/Response.php', |
202 | 181 | ], |
203 | 182 | ]) |
204 | 183 | // auto import fully qualified class names |
205 | | - ->withImportNames(removeUnusedImports: true) |
| 184 | + ->withImportNames() |
206 | 185 | ->withRules([ |
207 | 186 | DeclareStrictTypesRector::class, |
208 | 187 | UnderscoreToCamelCaseVariableNameRector::class, |
|
231 | 210 | ->withConfiguredRule(RenameConstantRector::class, [ |
232 | 211 | 'FILTER_DEFAULT' => 'FILTER_UNSAFE_RAW', |
233 | 212 | ]) |
234 | | - ->withCodeQualityLevel(61); |
| 213 | + ->withCodeQualityLevel(61) |
| 214 | + ->reportUnusedSkips(); |
0 commit comments