php - Refactor ternary to if-block programatically -



php - Refactor ternary to if-block programatically -

is there way through context menus refactor ternary assignment 1 done if-else block?

so, illustration you'd have this:

$a = ($b > -32)? "up" : "down";

you'd apply transformation, , phpstorm magically alter into:

if ($b > -32) { $a = "up"; } else { $a = "down"; }

seems mutual , automated operation, must automated somewhere in labyrinth of menus.

phpstorm 8 can alt-enter shortcut. set cursor @ ? operator , key in alt+enter.

php phpstorm

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -