|
22 | 22 | use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; |
23 | 23 | use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector; |
24 | 24 | use Rector\Config\RectorConfig; |
25 | | -use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; |
26 | 25 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
27 | | -use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; |
28 | 26 | use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector; |
29 | 27 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
30 | 28 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
31 | 29 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
32 | 30 | use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector; |
33 | 31 | use Rector\Php70\Rector\FuncCall\RandomFunctionRector; |
34 | | -use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector; |
35 | 32 | use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector; |
36 | 33 | use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; |
37 | 34 | use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; |
38 | 35 | use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
39 | | -use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector; |
40 | 36 | use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector; |
41 | 37 | use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector; |
42 | 38 | use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; |
|
99 | 95 | __DIR__ . '/tests/_support/Test/TestForReflectionHelper.php', |
100 | 96 | ], |
101 | 97 |
|
102 | | - RemoveUnusedConstructorParamRector::class => [ |
103 | | - // there are deprecated parameters |
104 | | - __DIR__ . '/system/Debug/Exceptions.php', |
105 | | - // @TODO remove if deprecated $httpVerb is removed |
106 | | - __DIR__ . '/system/Router/AutoRouterImproved.php', |
107 | | - // @TODO remove if deprecated $config is removed |
108 | | - __DIR__ . '/system/HTTP/Request.php', |
109 | | - __DIR__ . '/system/HTTP/Response.php', |
110 | | - ], |
111 | | - |
112 | 98 | // Exclude test file because `is_cli()` is mocked and Rector might remove needed parameters. |
113 | 99 | RemoveExtraParametersRector::class => [ |
114 | 100 | __DIR__ . '/tests/system/Debug/ToolbarTest.php', |
115 | 101 | ], |
116 | 102 |
|
117 | | - // check on constant compare |
118 | | - UnwrapFutureCompatibleIfPhpVersionRector::class => [ |
119 | | - __DIR__ . '/system/Autoloader/Autoloader.php', |
120 | | - ], |
121 | | - |
122 | 103 | UnderscoreToCamelCaseVariableNameRector::class => [ |
123 | 104 | // session handlers have the gc() method with underscored parameter `$max_lifetime` |
124 | 105 | __DIR__ . '/system/Session/Handlers', |
|
137 | 118 | __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
138 | 119 | ], |
139 | 120 |
|
| 121 | + DeclareStrictTypesTestsRector::class => [ |
| 122 | + __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
| 123 | + ], |
| 124 | + |
140 | 125 | // use mt_rand instead of random_int on purpose on non-cryptographically random |
141 | 126 | RandomFunctionRector::class, |
142 | 127 |
|
|
153 | 138 | ], |
154 | 139 |
|
155 | 140 | ReturnNeverTypeRector::class => [ |
156 | | - __DIR__ . '/system/Cache/Handlers/BaseHandler.php', |
157 | | - __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php', |
158 | | - __DIR__ . '/system/Cache/Handlers/WincacheHandler.php', |
159 | | - __DIR__ . '/system/CodeIgniter.php', |
160 | 141 | __DIR__ . '/system/Database/MySQLi/Utils.php', |
161 | 142 | __DIR__ . '/system/Database/OCI8/Utils.php', |
162 | 143 | __DIR__ . '/system/Database/Postgre/Utils.php', |
163 | 144 | __DIR__ . '/system/Database/SQLSRV/Utils.php', |
164 | 145 | __DIR__ . '/system/Database/SQLite3/Utils.php', |
165 | 146 | __DIR__ . '/system/HTTP/DownloadResponse.php', |
166 | 147 | __DIR__ . '/system/HTTP/SiteURI.php', |
167 | | - __DIR__ . '/system/Helpers/kint_helper.php', |
168 | | - __DIR__ . '/tests/_support/Autoloader/FatalLocator.php', |
169 | 148 | ], |
170 | 149 |
|
171 | 150 | // Unnecessary (string) is inserted |
|
176 | 155 | // possibly isset() on purpose, on updated Config classes property accross versions |
177 | 156 | IssetOnPropertyObjectToPropertyExistsRector::class, |
178 | 157 |
|
179 | | - AssertFuncCallToPHPUnitAssertRector::class => [ |
180 | | - // use $this inside static closure |
181 | | - __DIR__ . '/tests/system/AutoReview/FrameworkCodeTest.php', |
182 | | - ], |
183 | | - |
184 | 158 | // some tests extended by other tests |
185 | 159 | FinalizeTestCaseClassRector::class, |
186 | 160 |
|
187 | | - DeclareStrictTypesTestsRector::class => [ |
188 | | - __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
189 | | - ], |
190 | | - |
191 | 161 | RemoveNullArgOnNullDefaultParamRector::class => [ |
192 | 162 | // skip form query usage, easier to read |
193 | 163 | __DIR__ . '/system/Model.php', |
194 | 164 | __DIR__ . '/tests/system/Database', |
195 | 165 | __DIR__ . '/tests/system/Models', |
196 | 166 | ], |
197 | | - |
198 | | - StaticCallOnNonStaticToInstanceCallRector::class => [ |
199 | | - __DIR__ . '/tests/_support/Config/Services.php', |
200 | | - ], |
201 | 167 | ]) |
202 | 168 | // auto import fully qualified class names |
203 | 169 | ->withImportNames(removeUnusedImports: true) |
|
0 commit comments