Code Duplication    Length = 4-4 lines in 2 locations

event/listener.php 2 locations

@@ 322-325 (lines=4) @@
319
	 */
320
	public function submit_idea_before($event)
321
	{
322
		if (!$this->is_post_idea($event['mode'], $event['data']['forum_id'], empty($event['data']['topic_id'])))
323
		{
324
			return;
325
		}
326
327
		// We need $post_time after submit_post(), but it's not available in the post $data, unless we set it now
328
		$event->update_subarray('data', 'post_time', time());
@@ 338-341 (lines=4) @@
335
	 */
336
	public function submit_idea_after($event)
337
	{
338
		if (!$this->is_post_idea($event['mode'], $event['data']['forum_id'], !empty($event['data']['topic_id'])))
339
		{
340
			return;
341
		}
342
343
		$this->ideas->submit($event['data']);
344