php-fig / per-coding-style

PER coding style
262 stars 26 forks source link

Update on how to handle multi lines in control structures #50

Closed mathroc closed 1 year ago

mathroc commented 2 years ago

let me know if you think something like this should be done.

the first thing I wanted to take care of was to allow to break a function call or an array into multiple line in a control structures expression without having to switch to full multi line mode for the expression

and I also noticed a case where multi line could be authorized for catch expression with multiple union'ed types

KorvinSzanto commented 2 years ago

I don't like the idea of allowing multiline statements in control structures without the control structure being multiline. If the structure takes up multiple lines for any reason it should be treated as a multiline control structure to maintain readability.

samdark commented 1 year ago

I think we should close this PR. Thanks for participating anyway, @mathroc