Looking for which (if either) of the following ternary statement\'s syntax is compliant with PSR-2 - I
Some mixed opinions on this, and it's something that's unfortunately arbitrary.
What appears more common to me from what I’ve seen and have learned from would be best explained by noting the differences below, more specifically; how the parentheses don’t move in either case.
Long hand:
if ($is_full_page) {
echo "medium-6";
} else {
echo "medium-7";
}
Short hand:
echo ($is_full_page) ? 'medium-6' : 'medium-7';
That; to me; is true consistency in all it's beauty.