Fixes some PHP docblocks

Also type hints the $data parameter
Merge pull request #595 from pdewouters/docblocks

Fixes some PHP docblocks