Fixed most CS errors, with the notable exception to those regarding certain identifiers not being properly named.
Merge pull request #922 from boenrobot/cs-fix

PSR2 CS fixes