Code Duplication    Length = 13-13 lines in 2 locations

admin_pages/messages/Messages_Admin_Page.core.php 1 location

@@ 4366-4378 (lines=13) @@
4363
     */
4364
    public function save_settings()
4365
    {
4366
        if (! isset($this->_req_data['type'])) {
4367
            EE_Error::add_error(
4368
                esc_html__(
4369
                    'Cannot save settings because type is unknown (messenger settings or messsage type settings?)',
4370
                    'event_espresso'
4371
                ),
4372
                __FILE__,
4373
                __FUNCTION__,
4374
                __LINE__
4375
            );
4376
            $this->_template_args['error'] = true;
4377
            $this->_return_json();
4378
        }
4379
4380
4381
        if ($this->_req_data['type'] === 'messenger') {

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

@@ 544-556 (lines=13) @@
541
    {
542
        // first make sure the ID for the event is in the request.
543
        //  If it isn't then we need to bail and redirect back to overview list table (cause how did we get here?)
544
        if (! isset($this->_req_data['EVT_ID'])) {
545
            EE_Error::add_error(
546
                esc_html__(
547
                    'In order to duplicate an event an Event ID is required.  None was given.',
548
                    'event_espresso'
549
                ),
550
                __FILE__,
551
                __FUNCTION__,
552
                __LINE__
553
            );
554
            $this->_redirect_after_action(false, '', '', array(), true);
555
            return;
556
        }
557
        // k we've got EVT_ID so let's use that to get the event we'll duplicate
558
        $orig_event = EEM_Event::instance()->get_one_by_ID($this->_req_data['EVT_ID']);
559
        if (! $orig_event instanceof EE_Event) {