Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

statement_indentation doesn't like multiline const #7866

Closed
jackbentley opened this issue Mar 5, 2024 · 0 comments · Fixed by #7875
Closed

statement_indentation doesn't like multiline const #7866

jackbentley opened this issue Mar 5, 2024 · 0 comments · Fixed by #7875
Labels

Comments

@jackbentley
Copy link

Bug report

Description

statement_indentation erronously "fixes" multiline consts.

Runtime version

$ bin/php-cs-fixer -V
PHP CS Fixer 3.51.0 (008b824) Insomnia by Fabien Potencier, Dariusz Ruminski and contributors.
PHP runtime: 7.4.33

Used command

$ bin/php-cs-fixer fix -vvv --using-cache=no 

Code snippet that reproduces the problem

https://phptools.online/php-checker/result/3e3869b4-3bf4-4181-b36a-4ab5b3d9125b

<?php

class Foo
{
    protected const
        FOO = 'Bar',
        BAR = 'Foo';
}

Results in:

@@ -4,5 +4,5 @@
 {
     protected const
         FOO = 'Bar',
-        BAR = 'Foo';
+    BAR = 'Foo';
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant