fixing the defects detected by PHPCS