Code Duplication    Length = 13-13 lines in 2 locations

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php 1 location

@@ 481-493 (lines=13) @@
478
    {
479
        // first make sure the ID for the event is in the request.
480
        //  If it isn't then we need to bail and redirect back to overview list table (cause how did we get here?)
481
        if (! isset($this->_req_data['EVT_ID'])) {
482
            EE_Error::add_error(
483
                esc_html__(
484
                    'In order to duplicate an event an Event ID is required.  None was given.',
485
                    'event_espresso'
486
                ),
487
                __FILE__,
488
                __FUNCTION__,
489
                __LINE__
490
            );
491
            $this->_redirect_after_action(false, '', '', array(), true);
492
            return;
493
        }
494
        // k we've got EVT_ID so let's use that to get the event we'll duplicate
495
        $orig_event = EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']);
496
        if (! $orig_event instanceof EE_Event) {

admin_pages/messages/Messages_Admin_Page.core.php 1 location

@@ 4354-4366 (lines=13) @@
4351
     */
4352
    public function save_settings()
4353
    {
4354
        if (! isset($this->_req_data['type'])) {
4355
            EE_Error::add_error(
4356
                esc_html__(
4357
                    'Cannot save settings because type is unknown (messenger settings or messsage type settings?)',
4358
                    'event_espresso'
4359
                ),
4360
                __FILE__,
4361
                __FUNCTION__,
4362
                __LINE__
4363
            );
4364
            $this->_template_args['error'] = true;
4365
            $this->_return_json();
4366
        }
4367
4368
4369
        if ($this->_req_data['type'] === 'messenger') {