CS fixes

Most fixes have been done using the PHP-CS-Fixer tool. A few others are about fixing the phpdoc based on Scrutinizer suggestions and issues
right