Remove unused variables and PHPCS