This topic is based entirely on Ali's own personal opinion. It's not "bad" code use use the curly braces around single statements, it is just that Ali doesn't like that style.
The advantages and disadvantages of omitting the braces are, in my opinion, negligible and it's really just a matter of sticking with how
you want to do it.
PHP Code:
// This?
if (true === $condition)
$is_true = true;
else
$is_true = false;
//or this? OMG ONE MORE LINE!
if (true === $condition) {
$is_true = true;
} else {
$is_true = false;
}
// or this, with ternary operator
$is_true = (true === $condition) ? true : false;
// or lazy boolean, with ternary
$is_true = $condition ? true : false;
IMO, if it aids readability of the code then why on earth NOT use the curly braces?