I couldn't seem to find a good question on SO, or a good Google search that seemed to answer my question. What is the industry or popular preference when it comes to formating code "chunks" and their brackets. Here are some examples for what I am trying to explain...
if($foo)
{
return $bar;
}
else
{
return $stackOverflow;
}
VS
if($foo){
return $bar;
}else{
return $stackOverflow;
}
Of course, with similarities in the other major languages, and of course with any code blocks that use curly brackets. I have seen across the board both methods used, and the first one seems to make more sense as it allows one to quickly look up and down to find the matching bracket.
What are your thoughts?