Skip to content

Commit bf9a79d

Browse files
committed
clean
1 parent ed3484a commit bf9a79d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Rector/AbstractRector.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ protected function mirrorComments(Node $newNode, Node $oldNode, bool $mergeExist
306306

307307
if (! $mergeExistingComments) {
308308
$newNode->setAttribute(AttributeKey::PHP_DOC_INFO, $oldPhpDocInfo);
309+
} else {
310+
// set null as mix multiple docs will require re-build
311+
// on next call
312+
$newNode->setAttribute(AttributeKey::PHP_DOC_INFO, null);
309313
}
310314

311315
if (! $newNode instanceof Nop) {
@@ -314,10 +318,6 @@ protected function mirrorComments(Node $newNode, Node $oldNode, bool $mergeExist
314318
return;
315319
}
316320

317-
// set null as mix multiple docs will require re-build
318-
// on next call
319-
$newNode->setAttribute(AttributeKey::PHP_DOC_INFO, null);
320-
321321
$newComments = array_merge(
322322
(array) $newNode->getComments(),
323323
(array) $oldNode->getComments()

0 commit comments

Comments
 (0)