awesomemotive / wpforms-phpcs

PHP Coding Standards used by the WPForms team.
https://wpforms.com
GNU General Public License v2.0
11 stars 1 forks source link

Formatting ternary operators #28

Open mancunianez opened 1 year ago

mancunianez commented 1 year ago

As it was decided on Developers Chat (Feb 20, 2023) we need create new PHPCS rule for ternary operators.

Expected Behavior

Split long condition onto several lines, keeping the question mark and the colon at the front

$b = $condition3 && $condition4
    ? $foo_man_this_is_too_long_what_should_i_do
    : $bar;

Current Behavior

There is currently no rule for formatting.