Lots of PHPCS fixes

Got bored this weekend, decided to start fixing PHPCS errors on top of @localheinz pull request #6182
done