Skip to content

Commit fe5f301

Browse files
committed
chore: add DeclareStrictTypesRector
1 parent 4be8b3a commit fe5f301

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;
@@ -109,6 +110,19 @@
109110
__DIR__ . '/system/Session/Handlers',
110111
],
111112

113+
DeclareStrictTypesRector::class => [
114+
__DIR__ . '/app',
115+
__DIR__ . '/system/CodeIgniter.php',
116+
__DIR__ . '/system/Config/BaseConfig.php',
117+
__DIR__ . '/system/Commands/Generators/Views',
118+
__DIR__ . '/system/Pager/Views',
119+
__DIR__ . '/system/Test/ControllerTestTrait.php',
120+
__DIR__ . '/system/Validation/Views',
121+
__DIR__ . '/system/View/Parser.php',
122+
__DIR__ . '/tests/system/Debug/ExceptionsTest.php',
123+
__DIR__ . '/tests/system/View/Views',
124+
],
125+
112126
// use mt_rand instead of random_int on purpose on non-cryptographically random
113127
RandomFunctionRector::class,
114128

@@ -119,6 +133,7 @@
119133
$rectorConfig->importNames();
120134
$rectorConfig->removeUnusedImports();
121135

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

0 commit comments

Comments
 (0)