Skip to content

Commit 0f1cc10

Browse files
authored
Add annotation to attribute fixture (#6874)
* cs * add annotation to attribute fixture
1 parent 5e655f4 commit 0f1cc10

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Doctrine;
4+
5+
/**
6+
* @api used
7+
* @see somewhere
8+
*
9+
* @\Doctrine\ORM\Mapping\Entity(repositoryClass="App\Some\Class")
10+
*/
11+
class HandleWithApiAbove
12+
{
13+
}
14+
15+
?>
16+
-----
17+
<?php
18+
19+
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Doctrine;
20+
21+
/**
22+
* @api used
23+
* @see somewhere
24+
*/
25+
#[\Doctrine\ORM\Mapping\Entity(repositoryClass: \App\Some\Class::class)]
26+
class HandleWithApiAbove
27+
{
28+
}
29+
30+
?>

rules/Naming/Rector/Class_/RenamePropertyToMatchTypeRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ private function refactorClassProperties(Class_ $class): void
111111
continue;
112112
}
113113

114-
if (!$class->isFinal() && $property->isProtected()) {
114+
if (! $class->isFinal() && $property->isProtected()) {
115115
continue;
116116
}
117117

0 commit comments

Comments
 (0)