Code Duplication    Length = 5-20 lines in 3 locations

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

@@ 930-934 (lines=5) @@
927
            );
928
            $this->_redirect_after_action(false, '', '', $query_args, true);
929
        }
930
        if ($errors > 0) {
931
            EE_Error::add_error(
932
                sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors),
933
                __FILE__,
934
                __FUNCTION__,
935
                __LINE__
936
            );
937
        } else {

modules/messages/EED_Messages.module.php 2 locations

@@ 944-963 (lines=20) @@
941
        } else {
942
            //can count how many sent by using the messages in the queue
943
            $sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent());
944
            if ($sent_count > 0) {
945
                EE_Error::add_success(
946
                    sprintf(
947
                        _n(
948
                            'There was %d message successfully sent.',
949
                            'There were %d messages successfully sent.',
950
                            $sent_count,
951
                            'event_espresso'
952
                        ),
953
                        $sent_count
954
                    )
955
                );
956
            } else {
957
                EE_Error::overwrite_errors();
958
                EE_Error::add_error(
959
                    __('No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error.
960
					If there was an error, you can look at the messages in the message activity list table for any error messages.',
961
                        'event_espresso'),
962
                    __FILE__, __FUNCTION__, __LINE__
963
                );
964
            }
965
        }
966
        return $sent_queue;
@@ 1009-1026 (lines=18) @@
1006
            || EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request
1007
        ) {
1008
            $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent);
1009
            if ($queue_count > 0) {
1010
                EE_Error::add_success(
1011
                    sprintf(
1012
                        _n(
1013
                            '%d message successfully sent.',
1014
                            '%d messages successfully sent.',
1015
                            $queue_count,
1016
                            'event_espresso'
1017
                        ),
1018
                        $queue_count
1019
                    )
1020
                );
1021
            } else {
1022
                EE_Error::add_error(
1023
                    __('No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.',
1024
                        'event_espresso'),
1025
                    __FILE__, __FUNCTION__, __LINE__
1026
                );
1027
            }
1028
        } else {
1029
            EE_Error::add_error(