PHP review

I've added a lot of PSR-2 compliance and double -> single quote conversion (among other small changes). Should have done all in one commit really, but hindsight is 20/20 I guess.