mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
Updated Rector to commit b833a753cc1d999fe0e832367a83d48311e378b4
b833a753cc
[Performance] Early return FullyQualifiedObjectType on FQCN on ObjectTypeSpecifier (#6658)
This commit is contained in:
parent
bad8f383f5
commit
71cfadbfe5
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user