Fixes some PHP docblocks

Also type hints the $data parameter