fixed bug in phpunit test and phpcs cleanup