Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1071-1078 (lines=8) @@
1068
            }
1069
        }
1070
        $datetime = $datetime instanceof EE_Datetime ? $datetime : EEM_Datetime::instance()->get_one_by_ID($DTT_ID);
1071
        if ($datetime instanceof EE_Datetime && $this->_template_args['before_list_table'] !== '') {
1072
            $this->_template_args['before_list_table'] = substr($this->_template_args['before_list_table'], 0, -5);
1073
            $this->_template_args['before_list_table'] .= ' &nbsp;<span class="drk-grey-text">';
1074
            $this->_template_args['before_list_table'] .= '<span class="dashicons dashicons-calendar"></span>';
1075
            $this->_template_args['before_list_table'] .= $datetime->name();
1076
            $this->_template_args['before_list_table'] .= ' ( ' . $datetime->date_and_time_range() . ' )';
1077
            $this->_template_args['before_list_table'] .= '</span></h2>';
1078
        }
1079
        //if no datetime, then we're on the initial view, so let's give some helpful instructions on what the status column
1080
        //represents
1081
        if ( ! $datetime instanceof EE_Datetime) {

admin_pages/registrations/Registrations_Admin_Page.core.php 1 location

@@ 869-876 (lines=8) @@
866
            }
867
            $DTT_ID   = ! empty($this->_req_data['datetime_id']) ? absint($this->_req_data['datetime_id']) : 0;
868
            $datetime = EEM_Datetime::instance()->get_one_by_ID($DTT_ID);
869
            if ($datetime instanceof EE_Datetime && $this->_template_args['admin_page_header'] !== '') {
870
                $this->_template_args['admin_page_header'] = substr($this->_template_args['admin_page_header'], 0, -5);
871
                $this->_template_args['admin_page_header'] .= ' &nbsp;<span class="drk-grey-text">';
872
                $this->_template_args['admin_page_header'] .= '<span class="dashicons dashicons-calendar"></span>';
873
                $this->_template_args['admin_page_header'] .= $datetime->name();
874
                $this->_template_args['admin_page_header'] .= ' ( ' . $datetime->start_date() . ' )';
875
                $this->_template_args['admin_page_header'] .= '</span></h3>';
876
            }
877
        }
878
        $this->_template_args['after_list_table'] = $this->_display_legend($this->_registration_legend_items());
879
        $this->display_admin_list_table_page_with_no_sidebar();