Here is how I decide:

1. A statement like an if should always have braces.
2. A line should preferably be shorter than 80 characters.
3. If an entire if statement can be put within those 80 characters, do it.
4. If you have an if in one line, the braces aren't necessary.

With this, an if forms one single block that can be read just like an English sentence: "If id, call function".

The same goes for an if - continue in foreach statements, follow me through for an example: [jump](https://github.com/daviddeutsch/roundcubemail/commit/a46fb5724e6095e6a3c210861ed2b9c5d391c58f#commitcomment-3977925)