coding-standard icon indicating copy to clipboard operation
coding-standard copied to clipboard

StandaloneLinePromotedPropertyFixer impacts multiple attributes on the same line

Open gnutix opened this issue 3 months ago • 2 comments

Hello there,

A picture is worth a 1000 words:

    ---------- begin diff ----------
@@ -8,9 +8,11 @@
 class SomeClass
 {
     public function __construct(
-        #[JMS\Expose, JMS\Type('integer')]
+        #[JMS\Expose,
+        JMS\Type('integer')]
         private int $id,
-        #[JMS\Expose, JMS\Type('string')]
+        #[JMS\Expose,
+        JMS\Type('string')]
         private string $externalId = '',
     ) {}
    ----------- end diff -----------

Applied checkers:
 * Symplify\CodingStandard\Fixer\Spacing\StandaloneLinePromotedPropertyFixer

gnutix avatar Oct 01 '25 09:10 gnutix

Hey, sounds valid. Care to send PR?

TomasVotruba avatar Oct 01 '25 10:10 TomasVotruba

$ claude
> 💮 Pullrequesting... 🤖
https://github.com/symplify/coding-standard/pull/78

gnutix avatar Oct 01 '25 10:10 gnutix