Fixed many small phpcs issues

This pr fixes many small phpcs issues
PSR-2 is a generic coding standard that is a fit for pretty much everyone: doctrine is much stricter