Skip to content

Commit cb3f65e

Browse files
committed
clean up
1 parent 707bd56 commit cb3f65e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rules/Php81/NodeManipulator/AttributeGroupNewLiner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function newLine(File $file, Node $node): void
4949
}
5050

5151
$nextTokenText = $oldTokens[$startTokenPos + $iteration + 1]->text ?? '';
52-
if (str_starts_with($nextTokenText, "\n") || str_starts_with($nextTokenText, "\r")) {
53-
// already has newline
52+
// when trimmed is empty string, but it contains new line
53+
if (trim($nextTokenText) === '' && str_contains($nextTokenText, "\n")) {
5454
break;
5555
}
5656

0 commit comments

Comments
 (0)