Fix PHPCS error and warnings