Side note for Chris + public: alpha code has not been run through coding standards checklist. It does work with some tweaking but highly not recommended for production site.
I've been through very careful. The final result is pretty different to your code because the tickets API just went through a huge cleanup to make things more elegant. Functionally it's very similar. I didn't add a ticket_id field to the reported_content table because we're now generating semantic ticket IDs matching the content being reported.
#375 - Change reported posts addon to general reporting addon, and merge with tickets