Code Duplication    Length = 27-28 lines in 2 locations

admin_pages/messages/Messages_Admin_Page.core.php 2 locations

@@ 124-151 (lines=28) @@
121
     * @throws InvalidDataTypeException
122
     * @throws InvalidInterfaceException
123
     */
124
    public function get_messengers_for_list_table()
125
    {
126
        EE_Error::doing_it_wrong(
127
            __METHOD__,
128
            sprintf(
129
                esc_html__(
130
                    'This method is no longer in use.  There is no replacement for it. The method was used to generate a set of values for use in creating a messenger filter dropdown which is now generated differently via %s',
131
                    'event_espresso'
132
                ),
133
                'Messages_Admin_Page::get_messengers_select_input()'
134
            ),
135
            '4.9.9.rc.014'
136
        );
137
138
        $m_values = array();
139
        $active_messengers = EEM_Message::instance()->get_all(array('group_by' => 'MSG_messenger'));
140
        // setup messengers for selects
141
        $i = 1;
142
        foreach ($active_messengers as $active_messenger) {
143
            if ($active_messenger instanceof EE_Message) {
144
                $m_values[ $i ]['id'] = $active_messenger->messenger();
145
                $m_values[ $i ]['text'] = ucwords($active_messenger->messenger_label());
146
                $i++;
147
            }
148
        }
149
150
        return $m_values;
151
    }
152
153
154
    /**
@@ 162-188 (lines=27) @@
159
     * @throws InvalidDataTypeException
160
     * @throws InvalidInterfaceException
161
     */
162
    public function get_message_types_for_list_table()
163
    {
164
        EE_Error::doing_it_wrong(
165
            __METHOD__,
166
            sprintf(
167
                esc_html__(
168
                    'This method is no longer in use.  There is no replacement for it. The method was used to generate a set of values for use in creating a message type filter dropdown which is now generated differently via %s',
169
                    'event_espresso'
170
                ),
171
                'Messages_Admin_Page::get_message_types_select_input()'
172
            ),
173
            '4.9.9.rc.014'
174
        );
175
176
        $mt_values = array();
177
        $active_messages = EEM_Message::instance()->get_all(array('group_by' => 'MSG_message_type'));
178
        $i = 1;
179
        foreach ($active_messages as $active_message) {
180
            if ($active_message instanceof EE_Message) {
181
                $mt_values[ $i ]['id'] = $active_message->message_type();
182
                $mt_values[ $i ]['text'] = ucwords($active_message->message_type_label());
183
                $i++;
184
            }
185
        }
186
187
        return $mt_values;
188
    }
189
190
191
    /**