Fix random CS rules, fix some broken phpdocs
Merge pull request #1512 from stloyd/bugfix/cs

Fix random CS rules, fix some broken phpdocs, fix broken specs