PSR-2 standards

Convert the whole app to follow PSR-2 standards. This could be quite a lot of work but this pull request allows us to keep track of all the commits on the "feature/psr-2" branch. 

<https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md>