Skip to content

Commit a96ac00

Browse files
committed
DocCommentSpacingSniff: Fixer should preserve order of same annotations
1 parent 90d7331 commit a96ac00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SlevomatCodingStandard/Sniffs/Commenting/DocCommentSpacingSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ private function sortAnnotationsToGroups(array $annotations): array
616616
}
617617
};
618618

619-
return $getExpectedOrder($firstAnnotation->getName()) <=> $getExpectedOrder($secondAnnotation->getName());
619+
return $getExpectedOrder($firstAnnotation->getName()) <=> $getExpectedOrder($secondAnnotation->getName()) ?: $firstAnnotation->getStartPointer() <=> $secondAnnotation->getStartPointer();
620620
});
621621
}
622622

0 commit comments

Comments
 (0)