Phpdoc fixes

this fixes some phpdoc and typehints based on the Scrutinizer review