Testing all the PHPMD, with fixes

ruleset generated on http://edorian.github.io/php-coding-standard-generator/#phpmd