Add PHPDoc blocks and scrutinizer fixes