|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
3 | 5 | /** |
4 | 6 | * This file is part of CodeIgniter 4 framework. |
5 | 7 | * |
|
43 | 45 | use Rector\Set\ValueObject\LevelSetList; |
44 | 46 | use Rector\Set\ValueObject\SetList; |
45 | 47 | use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector; |
| 48 | +use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; |
46 | 49 | use Utils\Rector\PassStrictParameterToFunctionParameterRector; |
47 | 50 | use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector; |
48 | 51 | use Utils\Rector\UnderscoreToCamelCaseVariableNameRector; |
|
106 | 109 | __DIR__ . '/system/Session/Handlers', |
107 | 110 | ], |
108 | 111 |
|
| 112 | + DeclareStrictTypesRector::class => [ |
| 113 | + __DIR__ . '/app', |
| 114 | + __DIR__ . '/system/CodeIgniter.php', |
| 115 | + __DIR__ . '/system/Config/BaseConfig.php', |
| 116 | + __DIR__ . '/system/Commands/Generators/Views', |
| 117 | + __DIR__ . '/system/Pager/Views', |
| 118 | + __DIR__ . '/system/Test/ControllerTestTrait.php', |
| 119 | + __DIR__ . '/system/Validation/Views', |
| 120 | + __DIR__ . '/system/View/Parser.php', |
| 121 | + __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
| 122 | + __DIR__ . '/tests/system/View/Views', |
| 123 | + ], |
| 124 | + |
109 | 125 | // use mt_rand instead of random_int on purpose on non-cryptographically random |
110 | 126 | RandomFunctionRector::class, |
111 | 127 |
|
|
116 | 132 | $rectorConfig->importNames(); |
117 | 133 | $rectorConfig->removeUnusedImports(); |
118 | 134 |
|
| 135 | + $rectorConfig->rule(DeclareStrictTypesRector::class); |
119 | 136 | $rectorConfig->rule(UnderscoreToCamelCaseVariableNameRector::class); |
120 | 137 | $rectorConfig->rule(SimplifyUselessVariableRector::class); |
121 | 138 | $rectorConfig->rule(RemoveAlwaysElseRector::class); |
|
0 commit comments