Fixed formatting

- Fixed code formatting according to PSR-2
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
- Added missing DocBlocks