Code Duplication    Length = 7-7 lines in 2 locations

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php 2 locations

@@ 571-577 (lines=7) @@
568
            'Question_Group',
569
            [['Event_Question_Group.EQG_primary' => true]]
570
        );
571
        if (! empty($orig_primary_qgs)) {
572
            foreach ($orig_primary_qgs as $id => $obj) {
573
                if ($obj instanceof EE_Question_Group) {
574
                    $new_event->_add_relation_to($obj, 'Question_Group', ['EQG_primary' => true]);
575
                }
576
            }
577
        }
578
        // next additional attendee question groups
579
        $orig_additional_qgs = $orig_event->get_many_related(
580
            'Question_Group',
@@ 583-589 (lines=7) @@
580
            'Question_Group',
581
            [['Event_Question_Group.EQG_additional' => true]]
582
        );
583
        if (! empty($orig_additional_qgs)) {
584
            foreach ($orig_additional_qgs as $id => $obj) {
585
                if ($obj instanceof EE_Question_Group) {
586
                    $new_event->_add_relation_to($obj, 'Question_Group', ['EQG_additional' => true]);
587
                }
588
            }
589
        }
590
591
        $new_event->save();
592