fixes a few travis errors

switches to allman formatting

corrections made for PSR-2

splits long lines

fixes scrutinizer suggestions

fixes scrutinizer suggestions