diff --git a/rules/Naming/Naming/PropertyNaming.php b/rules/Naming/Naming/PropertyNaming.php index 1d7b7eb7af..f5db3c5307 100644 --- a/rules/Naming/Naming/PropertyNaming.php +++ b/rules/Naming/Naming/PropertyNaming.php @@ -11,13 +11,10 @@ use PHPStan\Type\ThisType; use PHPStan\Type\Type; use PHPStan\Type\TypeCombinator; -use PHPStan\Type\TypeWithClassName; use Rector\Exception\ShouldNotHappenException; use Rector\Naming\RectorNamingInflector; use Rector\Naming\ValueObject\ExpectedName; -use Rector\NodeTypeResolver\NodeTypeResolver; use Rector\StaticTypeMapper\Resolver\ClassNameFromObjectTypeResolver; -use Rector\StaticTypeMapper\ValueObject\Type\AliasedObjectType; use Rector\StaticTypeMapper\ValueObject\Type\SelfObjectType; use Rector\Util\StringUtils; @@ -57,7 +54,6 @@ public function __construct( private RectorNamingInflector $rectorNamingInflector, - private NodeTypeResolver $nodeTypeResolver, ) { } @@ -298,11 +294,6 @@ private function resolveClassNameFromType(Type $type): ?string return null; } - if ($type instanceof AliasedObjectType) { - return $className; - } - - /** @var TypeWithClassName $type */ - return $this->nodeTypeResolver->getFullyQualifiedClassName($type); + return $className; } }