Move open braces inline with the if/foreach statement; following PSR-2 Coding Style