Add comment and fix coding style PSR-2

+ Add comments to code
+ Fix coding style follow [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
+ Fix use `array` to `[ ]`