Fixed the issues reported by phpcs, formated the code