Fixing PHPMD and PHPCS errors