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

@@ 956-975 (lines=20) @@
953
        } else {
954
            //can count how many sent by using the messages in the queue
955
            $sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent());
956
            if ($sent_count > 0) {
957
                EE_Error::add_success(
958
                    sprintf(
959
                        _n(
960
                            'There was %d message successfully sent.',
961
                            'There were %d messages successfully sent.',
962
                            $sent_count,
963
                            'event_espresso'
964
                        ),
965
                        $sent_count
966
                    )
967
                );
968
            } else {
969
                EE_Error::overwrite_errors();
970
                EE_Error::add_error(
971
                    __('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.
972
					If there was an error, you can look at the messages in the message activity list table for any error messages.',
973
                        'event_espresso'),
974
                    __FILE__, __FUNCTION__, __LINE__
975
                );
976
            }
977
        }
978
        return $sent_queue;
@@ 1021-1038 (lines=18) @@
1018
            || EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request
1019
        ) {
1020
            $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent);
1021
            if ($queue_count > 0) {
1022
                EE_Error::add_success(
1023
                    sprintf(
1024
                        _n(
1025
                            '%d message successfully sent.',
1026
                            '%d messages successfully sent.',
1027
                            $queue_count,
1028
                            'event_espresso'
1029
                        ),
1030
                        $queue_count
1031
                    )
1032
                );
1033
            } else {
1034
                EE_Error::add_error(
1035
                    __('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.',
1036
                        'event_espresso'),
1037
                    __FILE__, __FUNCTION__, __LINE__
1038
                );
1039
            }
1040
        } else {
1041
            EE_Error::add_error(