Reformat code to follow PSR-1/2

A mostly automated reformat using https://github.com/fabpot/PHP-CS-Fixer
to format the code so that it follows PSR-1 and PSR-2
Merge pull request #6 from EspadaV8/feature/psr-2

Format code to follow PHP-FIG PSR-1/2