Reformat code to be PSR-2 compatible

see #2747