Skip to content

Commit

Permalink
Updated Rector to commit 8b7829f77f2393d41ff71a2e0f0504835e22bba2
Browse files Browse the repository at this point in the history
rectorphp/rector-src@8b7829f [AutoImport] Apply @\ auto import on AnnotationToAttributeRector (#5286)
  • Loading branch information
TomasVotruba committed Nov 25, 2023
1 parent 2591f22 commit 9fde5b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/PhpAttribute/NodeFactory/AttributeNameFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ public function __construct(UseAliasNameMatcher $useAliasNameMatcher)
*/
public function create(AnnotationToAttributeInterface $annotationToAttribute, DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode, array $uses)
{
// A. attribute and class name are the same, so we re-use the short form to keep code compatible with previous one
// A. attribute and class name are the same, so we re-use the short form to keep code compatible with previous one,
// except start with \
if ($annotationToAttribute->getAttributeClass() === $annotationToAttribute->getTag()) {
$attributeName = $doctrineAnnotationTagValueNode->identifierTypeNode->name;
$attributeName = \ltrim($attributeName, '@');
if (\strncmp($attributeName, '\\', \strlen('\\')) === 0) {
return new FullyQualified(\ltrim($attributeName, '\\'));
}
return new Name($attributeName);
}
// B. different name
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '3f42ee98ffefc73677b93308fe53508bd260a574';
public const PACKAGE_VERSION = '8b7829f77f2393d41ff71a2e0f0504835e22bba2';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-11-25 11:54:21';
public const RELEASE_DATE = '2023-11-25 17:49:41';
/**
* @var int
*/
Expand Down

0 comments on commit 9fde5b0

Please sign in to comment.