diff --git a/rector.php b/rector.php index e16de7bae441..14a079e0ab04 100644 --- a/rector.php +++ b/rector.php @@ -55,6 +55,7 @@ use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector; use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector; use Rector\TypeDeclaration\Rector\Function_\AddFunctionVoidReturnTypeWhereNoReturnRector; +use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; use Utils\Rector\PassStrictParameterToFunctionParameterRector; use Utils\Rector\RemoveErrorSuppressInTryCatchStmtsRector; @@ -215,6 +216,7 @@ AddClosureVoidReturnTypeWhereNoReturnRector::class, AddFunctionVoidReturnTypeWhereNoReturnRector::class, AddMethodCallBasedStrictParamTypeRector::class, + TypedPropertyFromAssignsRector::class, ]) ->withConfiguredRule(StringClassNameToClassConstantRector::class, [ // keep '\\' prefix string on string '\Foo\Bar' diff --git a/system/Config/Factories.php b/system/Config/Factories.php index d98664a24a7b..be66005a8adf 100644 --- a/system/Config/Factories.php +++ b/system/Config/Factories.php @@ -37,7 +37,7 @@ final class Factories * * @var array> */ - private static $options = []; + private static array $options = []; /** * Explicit options for the Config @@ -65,7 +65,7 @@ final class Factories * * @var array> */ - private static $aliases = []; + private static array $aliases = []; /** * Store for instances of any component that @@ -78,7 +78,7 @@ final class Factories * * @var array> */ - private static $instances = []; + private static array $instances = []; /** * Whether the component instances are updated? @@ -87,7 +87,7 @@ final class Factories * * @internal For caching only */ - private static $updated = []; + private static array $updated = []; /** * Define the class to load. You can *override* the concrete class.