refactor code sniffing and tweak code slightly

the PHP_CodeSniffer ruleset is now cloned from the Wikimedia git repo