Fixed PHPLocTask and some code reformatting

- refactored and fixed PHPLocTask for versions >= 2.0.0beta1
- reformat code by applying PSR standards