Fixing PHPCS and PHPMD errors