diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 5d04b131738..782db7e73eb 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'b9ea5fd9961997cecbd872cb345e88de582d6aca'; + public const PACKAGE_VERSION = 'f5a45a5aeb6e5e1264d546e55dbd8880046b36ce'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-02-22 19:48:37'; + public const RELEASE_DATE = '2024-02-22 14:09:52'; /** * @var int */ diff --git a/src/BetterPhpDocParser/PhpDocParser/ArrayItemClassNameDecorator.php b/src/BetterPhpDocParser/PhpDocParser/ArrayItemClassNameDecorator.php index 07bb4476faa..c4690627f5b 100644 --- a/src/BetterPhpDocParser/PhpDocParser/ArrayItemClassNameDecorator.php +++ b/src/BetterPhpDocParser/PhpDocParser/ArrayItemClassNameDecorator.php @@ -5,7 +5,6 @@ namespace Rector\BetterPhpDocParser\PhpDocParser; use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode; use PhpParser\Node as PhpNode; -use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode; use PHPStan\PhpDocParser\Ast\Node; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; use Rector\BetterPhpDocParser\Contract\PhpDocParser\PhpDocNodeDecoratorInterface; @@ -50,16 +49,14 @@ final class ArrayItemClassNameDecorator implements PhpDocNodeDecoratorInterface if (\count($splitScopeResolution) !== 2) { return null; } - $firstName = $splitScopeResolution[0]; - $constFetchNode = new ConstFetchNode($firstName, $firstName); - $className = $this->resolveFullyQualifiedClass($constFetchNode, $phpNode); + $className = $this->resolveFullyQualifiedClass($splitScopeResolution[0], $phpNode); $node->setAttribute(PhpDocAttributeKey::RESOLVED_CLASS, $className); return $node; }); } - private function resolveFullyQualifiedClass(ConstFetchNode $constFetchNode, PhpNode $phpNode) : string + private function resolveFullyQualifiedClass(string $className, PhpNode $phpNode) : string { $nameScope = $this->nameScopeFactory->createNameScopeFromNodeWithoutTemplateTypes($phpNode); - return $nameScope->resolveStringName($constFetchNode->className); + return $nameScope->resolveStringName($className); } }