From 8497af3518ecf50e48113811df7792d12d7188ee Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 30 Jun 2024 21:49:37 +0000 Subject: [PATCH] [ci-review] Rector Rectify --- src/DependencyInjection/LazyContainerFactory.php | 6 ++---- src/StaticTypeMapper/Naming/NameScopeFactory.php | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/DependencyInjection/LazyContainerFactory.php b/src/DependencyInjection/LazyContainerFactory.php index 4cc54588b1c..e8e86161279 100644 --- a/src/DependencyInjection/LazyContainerFactory.php +++ b/src/DependencyInjection/LazyContainerFactory.php @@ -4,6 +4,7 @@ namespace Rector\DependencyInjection; +use Rector\PHPStanStaticTypeMapper\TypeMapper\StaticTypeMapper; use Doctrine\Inflector\Inflector; use Doctrine\Inflector\Rules\English\InflectorFactory; use Illuminate\Container\Container; @@ -22,7 +23,6 @@ use Rector\Application\Provider\CurrentFileProvider; use Rector\BetterPhpDocParser\Contract\BasePhpDocNodeVisitorInterface; use Rector\BetterPhpDocParser\Contract\PhpDocParser\PhpDocNodeDecoratorInterface; -use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; use Rector\BetterPhpDocParser\PhpDocNodeMapper; use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ArrayTypePhpDocNodeVisitor; use Rector\BetterPhpDocParser\PhpDocNodeVisitor\CallableTypePhpDocNodeVisitor; @@ -165,7 +165,6 @@ use Rector\StaticTypeMapper\Contract\PhpDocParser\PhpDocTypeMapperInterface; use Rector\StaticTypeMapper\Contract\PhpParser\PhpParserNodeMapperInterface; use Rector\StaticTypeMapper\Mapper\PhpParserNodeMapper; -use Rector\StaticTypeMapper\Naming\NameScopeFactory; use Rector\StaticTypeMapper\PhpDoc\PhpDocTypeMapper; use Rector\StaticTypeMapper\PhpDocParser\IdentifierTypeMapper; use Rector\StaticTypeMapper\PhpDocParser\IntersectionTypeMapper; @@ -179,7 +178,6 @@ use Rector\StaticTypeMapper\PhpParser\NullableTypeNodeMapper; use Rector\StaticTypeMapper\PhpParser\StringNodeMapper; use Rector\StaticTypeMapper\PhpParser\UnionTypeNodeMapper; -use Rector\StaticTypeMapper\StaticTypeMapper; use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Style\SymfonyStyle; @@ -297,7 +295,7 @@ final class LazyContainerFactory ParentStaticTypeMapper::class, ResourceTypeMapper::class, SelfObjectTypeMapper::class, - \Rector\PHPStanStaticTypeMapper\TypeMapper\StaticTypeMapper::class, + StaticTypeMapper::class, StrictMixedTypeMapper::class, StringTypeMapper::class, ThisTypeMapper::class, diff --git a/src/StaticTypeMapper/Naming/NameScopeFactory.php b/src/StaticTypeMapper/Naming/NameScopeFactory.php index d108cdf8b4a..af8fdc1c166 100644 --- a/src/StaticTypeMapper/Naming/NameScopeFactory.php +++ b/src/StaticTypeMapper/Naming/NameScopeFactory.php @@ -17,10 +17,10 @@ /** * @see https://github.com/phpstan/phpstan-src/blob/8376548f76e2c845ae047e3010e873015b796818/src/Analyser/NameScope.php#L32 */ -final class NameScopeFactory +final readonly class NameScopeFactory { public function __construct( - private readonly UseImportsResolver $useImportsResolver, + private UseImportsResolver $useImportsResolver, ) { }