Skip to content

Commit

Permalink
[Naming] Clean up unnecessary use of NodeTypeResolver on PropertyNami…
Browse files Browse the repository at this point in the history
…ng (#6507)
  • Loading branch information
samsonasik authored Nov 24, 2024
1 parent 6e655b4 commit fb169fa
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions rules/Naming/Naming/PropertyNaming.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -57,7 +54,6 @@

public function __construct(
private RectorNamingInflector $rectorNamingInflector,
private NodeTypeResolver $nodeTypeResolver,
) {
}

Expand Down Expand Up @@ -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;
}
}

0 comments on commit fb169fa

Please sign in to comment.