Skip to content

Commit

Permalink
Move pull StaticTypeMapper from AbstractRector into rules (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Sep 29, 2023
1 parent e1b3dab commit 850b492
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Rector\Core\Rector\AbstractRector;
use Rector\Core\Reflection\ReflectionResolver;
use Rector\Core\ValueObject\MethodName;
use Rector\StaticTypeMapper\StaticTypeMapper;
use ReflectionMethod;
use ReflectionNamedType;
use ReflectionParameter;
Expand All @@ -36,7 +37,8 @@ public function __construct(
private readonly PhpDocTypeChanger $phpDocTypeChanger,
private readonly ParamAnalyzer $paramAnalyzer,
private readonly ReflectionResolver $reflectionResolver,
private readonly PhpDocInfoFactory $phpDocInfoFactory
private readonly PhpDocInfoFactory $phpDocInfoFactory,
private readonly StaticTypeMapper $staticTypeMapper
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
use Rector\PHPStanStaticTypeMapper\TypeAnalyzer\UnionTypeAnalyzer;
use Rector\StaticTypeMapper\StaticTypeMapper;
use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand All @@ -47,6 +48,7 @@ public function __construct(
private readonly UnionTypeAnalyzer $unionTypeAnalyzer,
private readonly DocBlockUpdater $docBlockUpdater,
private readonly PhpDocInfoFactory $phpDocInfoFactory,
private readonly StaticTypeMapper $staticTypeMapper,
) {
}

Expand Down

0 comments on commit 850b492

Please sign in to comment.