Both styles are well formed, correct, and appropriate. Which one is more appropriate depends largely upon your company's style guidelines. Modern IDEs will facilitate the use of both styles through the use of live syntax linting that explicitly highlight areas that might have otherwise become a source of confusion.
For example, the following expression is highlighted by Netbeans:
if($a = someFunction())
if($a = someFunction())
on the grounds of "accidental assignment".
To explicitly tell Netbeans that "yeah, I really meant to do that...", the expression can be wrapped in a set of parenthesis.
if(($a = someFunction()))
if(($a = someFunction()))
At the end of the day, it all boils down to company style guidelines and the availability of modern tools to facilitate the development process.


 
                