Adapted to PSR2, as well as added more tests