Bug Report
| Subject |
Details |
| Rector version |
Rector 0.17.6 |
The FinalizeClassesWithoutChildrenRector rector removes newlines when the class has and attribute in the line above.
Minimal PHP Code Causing Issue
#[Attribute]
class Dummy
{
}
will get corrected to
#[Attribute]final class Dummy
{
}
When I add the line break before final again and rerun rector, I get no changes, so it doesn't seem to have anything to do with e.g. the length of the lines.
Expected Behaviour
I'd expect rector to not remove the line break before the final keyword.
Or "spoken" in PHP ;-)
#[Attribute]
final class Dummy
{
}