Skip to content

Commit d0b3895

Browse files
committed
chore: add DeclareStrictTypesRector
1 parent c590741 commit d0b3895

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

rector.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
use Rector\Set\ValueObject\LevelSetList;
4646
use Rector\Set\ValueObject\SetList;
4747
use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector;
48+
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
4849
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
4950
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
5051
use Utils\Rector\RemoveVarTagFromClassConstantRector;
@@ -108,6 +109,19 @@
108109
__DIR__ . '/system/Session/Handlers',
109110
],
110111

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+
111125
// use mt_rand instead of random_int on purpose on non-cryptographically random
112126
RandomFunctionRector::class,
113127

@@ -118,6 +132,7 @@
118132
$rectorConfig->importNames();
119133
$rectorConfig->removeUnusedImports();
120134

135+
$rectorConfig->rule(DeclareStrictTypesRector::class);
121136
$rectorConfig->rule(UnderscoreToCamelCaseVariableNameRector::class);
122137
$rectorConfig->rule(SimplifyUselessVariableRector::class);
123138
$rectorConfig->rule(RemoveAlwaysElseRector::class);

0 commit comments

Comments
 (0)