PSR-2 fixes + documentation

used phpmd and phpcs to fix some files