Changes to follow PSR2 coding standard (including a mandatory namespace)

Little fixes to follow the PSR2 coding standard (http://www.php-fig.org/psr/psr-2/).
Checked with PHP_CodeSniffer version 1.5.0RC2 using the option --standard=psr2
All tests passed.