Skip to content

Commit

Permalink
Merge pull request #9184 from samsonasik/refactor-typed-property
Browse files Browse the repository at this point in the history
refactor: enable TypedPropertyFromAssignsRector
  • Loading branch information
samsonasik committed Sep 10, 2024
2 parents b678930 + 45a002f commit 092d85b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -215,6 +216,7 @@
AddClosureVoidReturnTypeWhereNoReturnRector::class,
AddFunctionVoidReturnTypeWhereNoReturnRector::class,
AddMethodCallBasedStrictParamTypeRector::class,
TypedPropertyFromAssignsRector::class,
])
->withConfiguredRule(StringClassNameToClassConstantRector::class, [
// keep '\\' prefix string on string '\Foo\Bar'
Expand Down
8 changes: 4 additions & 4 deletions system/Config/Factories.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class Factories
*
* @var array<string, array<string, bool|string|null>>
*/
private static $options = [];
private static array $options = [];

/**
* Explicit options for the Config
Expand Down Expand Up @@ -65,7 +65,7 @@ final class Factories
*
* @var array<string, array<string, class-string>>
*/
private static $aliases = [];
private static array $aliases = [];

/**
* Store for instances of any component that
Expand All @@ -78,7 +78,7 @@ final class Factories
*
* @var array<string, array<class-string, object>>
*/
private static $instances = [];
private static array $instances = [];

/**
* Whether the component instances are updated?
Expand All @@ -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.
Expand Down

0 comments on commit 092d85b

Please sign in to comment.