Updated Rector to commit b833a753cc1d999fe0e832367a83d48311e378b4

b833a753cc [Performance] Early return FullyQualifiedObjectType on FQCN on ObjectTypeSpecifier (#6658)
This commit is contained in:
Tomas Votruba 2025-01-06 18:07:08 +00:00
parent bad8f383f5
commit 71cfadbfe5
2 changed files with 6 additions and 6 deletions

View File

@ -52,6 +52,10 @@ final class ObjectTypeSpecifier
*/
public function narrowToFullyQualifiedOrAliasedObjectType(Node $node, ObjectType $objectType, ?\PHPStan\Analyser\Scope $scope, bool $withPreslash = \false)
{
$className = \ltrim($objectType->getClassName(), '\\');
if (\strncmp($objectType->getClassName(), '\\', \strlen('\\')) === 0) {
return new FullyQualifiedObjectType($className);
}
$uses = $this->useImportsResolver->resolve();
$aliasedObjectType = $this->matchAliasedObjectType($objectType, $uses);
if ($aliasedObjectType instanceof AliasedObjectType) {
@ -61,10 +65,6 @@ final class ObjectTypeSpecifier
if ($shortenedObjectType !== null) {
return $shortenedObjectType;
}
$className = \ltrim($objectType->getClassName(), '\\');
if (\strncmp($objectType->getClassName(), '\\', \strlen('\\')) === 0) {
return new FullyQualifiedObjectType($className);
}
if ($this->reflectionProvider->hasClass($className)) {
return new FullyQualifiedObjectType($className);
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '4b18c82b21ad76410037090b0bf4c019fa983f08';
public const PACKAGE_VERSION = 'b833a753cc1d999fe0e832367a83d48311e378b4';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-01-06 16:24:17';
public const RELEASE_DATE = '2025-01-07 01:04:32';
/**
* @var int
*/