Updated coursecontroller.php to use PHP coding standards. Basically
fixing issues raised by phpcs and using php-cs-fixer.phar