Code Duplication    Length = 8-8 lines in 2 locations

caffeinated/admin/extend/registrations/Extend_Registrations_Admin_Page.core.php 1 location

@@ 1114-1121 (lines=8) @@
1111
            }
1112
        }
1113
        $datetime = $datetime instanceof EE_Datetime ? $datetime : EEM_Datetime::instance()->get_one_by_ID($DTT_ID);
1114
        if ($datetime instanceof EE_Datetime && $this->_template_args['before_list_table'] !== '') {
1115
            $this->_template_args['before_list_table'] = substr($this->_template_args['before_list_table'], 0, -5);
1116
            $this->_template_args['before_list_table'] .= ' &nbsp;<span class="drk-grey-text">';
1117
            $this->_template_args['before_list_table'] .= '<span class="dashicons dashicons-calendar"></span>';
1118
            $this->_template_args['before_list_table'] .= $datetime->name();
1119
            $this->_template_args['before_list_table'] .= ' ( ' . $datetime->date_and_time_range() . ' )';
1120
            $this->_template_args['before_list_table'] .= '</span></h2>';
1121
        }
1122
        //if no datetime, then we're on the initial view, so let's give some helpful instructions on what the status column
1123
        //represents
1124
        if ( ! $datetime instanceof EE_Datetime) {

admin_pages/registrations/Registrations_Admin_Page.core.php 1 location

@@ 1061-1068 (lines=8) @@
1058
            }
1059
            $DTT_ID   = ! empty($this->_req_data['datetime_id']) ? absint($this->_req_data['datetime_id']) : 0;
1060
            $datetime = EEM_Datetime::instance()->get_one_by_ID($DTT_ID);
1061
            if ($datetime instanceof EE_Datetime && $this->_template_args['admin_page_header'] !== '') {
1062
                $this->_template_args['admin_page_header'] = substr(
1063
                    $this->_template_args['admin_page_header'],
1064
                    0,
1065
                    -5
1066
                );
1067
                $this->_template_args['admin_page_header'] .= ' &nbsp;<span class="drk-grey-text">';
1068
                $this->_template_args['admin_page_header'] .= '<span class="dashicons dashicons-calendar"></span>';
1069
                $this->_template_args['admin_page_header'] .= $datetime->name();
1070
                $this->_template_args['admin_page_header'] .= ' ( ' . $datetime->start_date() . ' )';
1071
                $this->_template_args['admin_page_header'] .= '</span></h3>';