The { should be on the same line. It should be a space after "if" and before "(". 

Check out this link for reference: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md