File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
rules/DowngradePhp80/Rector/Class_ Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1919use Rector \Contract \Rector \ConfigurableRectorInterface ;
2020use Rector \DowngradePhp80 \ValueObject \DowngradeAttributeToAnnotation ;
2121use Rector \NodeFactory \DoctrineAnnotationFactory ;
22+ use Rector \NodeTypeResolver \Node \AttributeKey ;
2223use Rector \Rector \AbstractRector ;
2324use Symplify \RuleDocGenerator \ValueObject \CodeSample \ConfiguredCodeSample ;
2425use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
@@ -120,8 +121,7 @@ public function refactor(Node $node): ?Node
120121 (string ) $ oldTokens [$ attrGroup ->getEndTokenPos () + 1 ],
121122 "\n"
122123 )) {
123- // add new line
124- $ oldTokens [$ attrGroup ->getEndTokenPos () + 1 ]->text = "\n" . $ oldTokens [$ attrGroup ->getEndTokenPos () + 1 ]->text ;
124+ $ node ->setAttribute (AttributeKey::ORIGINAL_NODE , null );
125125 $ this ->isDowngraded = true ;
126126 }
127127
You can’t perform that action at this time.
0 commit comments