reformat some code to comply with the PSR-2 standard

https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md