Just suggestion: I think It would be nice and more cleaner if the code will be formatted using PSR2.