Fix PHPDocs and typehints.