-
Notifications
You must be signed in to change notification settings - Fork 2k
refactor: add declare(strict_types=1)
#8072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@samsonasik --- a/rector.php
+++ b/rector.php
@@ -44,6 +44,7 @@ use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector;
+use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
use Utils\Rector\RemoveVarTagFromClassConstantRector;
@@ -107,6 +108,15 @@ return static function (RectorConfig $rectorConfig): void {
__DIR__ . '/system/Session/Handlers',
],
+ DeclareStrictTypesRector::class => [
+ __DIR__ . '/app',
+ __DIR__ . '/system/Commands/Generators/Views',
+ __DIR__ . '/system/Pager/Views',
+ __DIR__ . '/system/Validation/Views',
+ __DIR__ . '/system/View/Parser.php',
+ __DIR__ . '/tests/system/View/Views',
+ ],
+
// use mt_rand instead of random_int on purpose on non-cryptographically random
RandomFunctionRector::class,
@@ -117,6 +127,7 @@ return static function (RectorConfig $rectorConfig): void {
$rectorConfig->importNames();
$rectorConfig->removeUnusedImports();
+ $rectorConfig->rule(DeclareStrictTypesRector::class);
$rectorConfig->rule(UnderscoreToCamelCaseVariableNameRector::class);
$rectorConfig->rule(SimplifyUselessVariableRector::class);
$rectorConfig->rule(RemoveAlwaysElseRector::class); |
|
I am on mobile, but that seems a bug due to |
|
What a long-standing conversation! I think this is the right time to do this. @lonnieezell What was our |
909e7b7 to
94c109a
Compare
|
I like type control. |
|
👋 Hi, @kenjis! |
94c109a to
e7323f3
Compare
|
👋 Hi, @kenjis! |
7c9cf1e to
55d04f7
Compare
60d3980 to
3b31066
Compare
|
👋 Hi, @kenjis! |
3b31066 to
d0b3895
Compare
|
👋 Hi, @kenjis! |
e1fb8f4 to
25e70cc
Compare
25e70cc to
dd84a82
Compare
dd84a82 to
3dfb298
Compare
9a4da43 to
71e8443
Compare
71e8443 to
4b87253
Compare
4b87253 to
528512d
Compare
|
All checks have passed! 🎉 |
|
Now in |
Needs
#8078, #8080, #8090, #8091, #8124, #8138, #8175, #8242, #8270Description
declare(strict_types=1)Checklist: