Skip to content

Commit 092d85b

Browse files
authored
Merge pull request #9184 from samsonasik/refactor-typed-property
refactor: enable TypedPropertyFromAssignsRector
2 parents b678930 + 45a002f commit 092d85b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
5656
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
5757
use Rector\TypeDeclaration\Rector\Function_\AddFunctionVoidReturnTypeWhereNoReturnRector;
58+
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
5859
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
5960
use Utils\Rector\PassStrictParameterToFunctionParameterRector;
6061
use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector;
@@ -215,6 +216,7 @@
215216
AddClosureVoidReturnTypeWhereNoReturnRector::class,
216217
AddFunctionVoidReturnTypeWhereNoReturnRector::class,
217218
AddMethodCallBasedStrictParamTypeRector::class,
219+
TypedPropertyFromAssignsRector::class,
218220
])
219221
->withConfiguredRule(StringClassNameToClassConstantRector::class, [
220222
// keep '\\' prefix string on string '\Foo\Bar'

system/Config/Factories.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class Factories
3737
*
3838
* @var array<string, array<string, bool|string|null>>
3939
*/
40-
private static $options = [];
40+
private static array $options = [];
4141

4242
/**
4343
* Explicit options for the Config
@@ -65,7 +65,7 @@ final class Factories
6565
*
6666
* @var array<string, array<string, class-string>>
6767
*/
68-
private static $aliases = [];
68+
private static array $aliases = [];
6969

7070
/**
7171
* Store for instances of any component that
@@ -78,7 +78,7 @@ final class Factories
7878
*
7979
* @var array<string, array<class-string, object>>
8080
*/
81-
private static $instances = [];
81+
private static array $instances = [];
8282

8383
/**
8484
* Whether the component instances are updated?
@@ -87,7 +87,7 @@ final class Factories
8787
*
8888
* @internal For caching only
8989
*/
90-
private static $updated = [];
90+
private static array $updated = [];
9191

9292
/**
9393
* Define the class to load. You can *override* the concrete class.

0 commit comments

Comments
 (0)