Skip to content

Commit adff440

Browse files
committed
fix
1 parent 8ad4f66 commit adff440

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

rules-tests/Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/use_empty_attribute.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture;
1919

2020
use Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\Attribute\EmptyAttribute;
2121

22-
#[\Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Source\Attribute\EmptyAttribute(foo: '')]
22+
#[EmptyAttribute(foo: '')]
2323
class UseEmptyAttribute
2424
{
2525
}

src/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ private function mapClassReferences(Expr|string $expr, array $classReferencedFie
154154
continue;
155155
}
156156

157+
if ($arrayItem->value->value === '') {
158+
continue;
159+
}
160+
157161
$arrayItem->value = new ClassConstFetch(new FullyQualified($arrayItem->value->value), 'class');
158162
}
159163
}

0 commit comments

Comments
 (0)