Updated the class code according to PSR-2 coding standards