Feature/81 php standards compliance

@mturalenka 

I went through the PHP storm code analysis and fixed the things I think I could fix.
Please review and merge those AFTER #36 has been merged (because I did not branch from master :poop: ).
There's plenty more things listed in the issue :-)