Skip to content

Commit 850b492

Browse files
authored
Move pull StaticTypeMapper from AbstractRector into rules (#195)
1 parent e1b3dab commit 850b492

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Rector\Core\Rector\AbstractRector;
1818
use Rector\Core\Reflection\ReflectionResolver;
1919
use Rector\Core\ValueObject\MethodName;
20+
use Rector\StaticTypeMapper\StaticTypeMapper;
2021
use ReflectionMethod;
2122
use ReflectionNamedType;
2223
use ReflectionParameter;
@@ -36,7 +37,8 @@ public function __construct(
3637
private readonly PhpDocTypeChanger $phpDocTypeChanger,
3738
private readonly ParamAnalyzer $paramAnalyzer,
3839
private readonly ReflectionResolver $reflectionResolver,
39-
private readonly PhpDocInfoFactory $phpDocInfoFactory
40+
private readonly PhpDocInfoFactory $phpDocInfoFactory,
41+
private readonly StaticTypeMapper $staticTypeMapper
4042
) {
4143
}
4244

rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Rector\NodeTypeResolver\Node\AttributeKey;
2929
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
3030
use Rector\PHPStanStaticTypeMapper\TypeAnalyzer\UnionTypeAnalyzer;
31+
use Rector\StaticTypeMapper\StaticTypeMapper;
3132
use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType;
3233
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
3334
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@@ -47,6 +48,7 @@ public function __construct(
4748
private readonly UnionTypeAnalyzer $unionTypeAnalyzer,
4849
private readonly DocBlockUpdater $docBlockUpdater,
4950
private readonly PhpDocInfoFactory $phpDocInfoFactory,
51+
private readonly StaticTypeMapper $staticTypeMapper,
5052
) {
5153
}
5254

0 commit comments

Comments
 (0)