Which rule changes multiline array inside function argument into single line? #7185
-
My .php-cs-fixer.php <?php
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'@Symfony' => true,
])
->setLineEnding("\n"); It formats my code like this. - throw \Illuminate\Validation\ValidationException::withMessages([
- 'attr1' => __('invalid', ['attribute' => 'Attribute 1']),
- 'attr2' => __('invalid', ['attribute' => 'Attribute 2']),
- ]);
+ throw \Illuminate\Validation\ValidationException::withMessages(['attr1' => __('invalid', ['attribute' => 'Attribute 1']), 'attr2' => __('invalid', ['attribute' => 'Attribute 2'])]); It is not triggered if I disable the Which rule converts the code above? And can we enforce the style to prefer the former? I have looked around the Symfony rules, but can't find it. |
Beta Was this translation helpful? Give feedback.
Answered by
christhofer
Jul 28, 2023
Replies: 1 comment 3 replies
-
Please run Fixer with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I finally get to do it from a terminal.
It is showing: