Code Duplication    Length = 20-20 lines in 2 locations

modules/ticket_selector/DisplayTicketSelector.php 2 locations

@@ 334-353 (lines=20) @@
331
     * @return string
332
     * @throws EE_Error
333
     */
334
    protected function ticketSalesClosedMessage()
335
    {
336
        $sales_closed_msg = esc_html__(
337
            'We\'re sorry, but ticket sales have been closed at this time. Please check back again later.',
338
            'event_espresso'
339
        );
340
        if (current_user_can('edit_post', $this->event->ID())) {
341
            $sales_closed_msg .= sprintf(
342
                esc_html__(
343
                    '%sNote to Event Admin:%sThe "Maximum number of tickets allowed per order for this event" in the Event Registration Options has been set to "0". This effectively turns off ticket sales. %s(click to edit this event)%s',
344
                    'event_espresso'
345
                ),
346
                '<div class="ee-attention" style="text-align: left;"><b>',
347
                '</b><br />',
348
                '<span class="edit-link"><a class="post-edit-link" href="'
349
                . get_edit_post_link($this->event->ID())
350
                . '">',
351
                '</a></span></div><!-- .ee-attention ticketSalesClosedMessage -->'
352
            );
353
        }
354
        return '<p><span class="important-notice">' . $sales_closed_msg . '</span></p>';
355
    }
356
@@ 303-322 (lines=20) @@
300
     * @return string
301
     * @throws EE_Error
302
     */
303
    protected function noTicketAvailableMessage()
304
    {
305
        $no_ticket_available_msg = esc_html__('We\'re sorry, but all ticket sales have ended.', 'event_espresso');
306
        if (current_user_can('edit_post', $this->event->ID())) {
307
            $no_ticket_available_msg .= sprintf(
308
                esc_html__(
309
                    '%1$sNote to Event Admin:%2$sNo tickets were found for this event. This effectively turns off ticket sales. Please ensure that at least one ticket is available for if you want people to be able to register.%3$s(click to edit this event)%4$s',
310
                    'event_espresso'
311
                ),
312
                '<div class="ee-attention" style="text-align: left;"><b>',
313
                '</b><br />',
314
                '<span class="edit-link"><a class="post-edit-link" href="'
315
                . get_edit_post_link($this->event->ID())
316
                . '">',
317
                '</a></span></div><!-- .ee-attention noTicketAvailableMessage -->'
318
            );
319
        }
320
        return '
321
            <div class="ee-event-expired-notice">
322
                <span class="important-notice">' . $no_ticket_available_msg . '</span>
323
            </div><!-- .ee-event-expired-notice -->';
324
    }
325