Which formatter rule adds parentheses around statements? #1051
Unanswered
nikspyratos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Making this as a discussion as I don't want to be presumptuous if this is a bug or just me not reading the docs/code right.
I have the following piece of code:
Mago's formatter changes it to:
But I'm not sure which formatter config makes it do this? Or is it some built in default? Haven't determined it from the docs or config presets. I did try and pick some potential culprits (basically anything interacting with parentheses) and enabled/disabled one by one, and they all ran.
The reason I ask is because PHPCS/Pint's
no_unneeded_control_parenthesesdefault setting (true) conflicts with this formatter logic, for the purposes of Pint preset parity at least.Beta Was this translation helpful? Give feedback.
All reactions