Cleans up two PHPCS issues in index.php

Removes unused parameter and moves the usage of the SERVER global outside of function scope.