Code Duplication    Length = 5-20 lines in 4 locations

admin_pages/transactions/Transactions_Admin_Page.core.php 1 location

@@ 1485-1492 (lines=8) @@
1482
        /** @type EE_Transaction_Payments $transaction_payments */
1483
        $transaction_payments = EE_Registry::instance()->load_class('Transaction_Payments');
1484
        //update the transaction with this payment
1485
        if ($transaction_payments->calculate_total_payments_and_update_status($transaction)) {
1486
            EE_Error::add_success(esc_html__('The payment has been processed successfully.', 'event_espresso'),
1487
                __FILE__, __FUNCTION__, __LINE__);
1488
        } else {
1489
            EE_Error::add_error(
1490
                esc_html__('The payment was processed successfully but the amount paid for the transaction was not updated.',
1491
                    'event_espresso')
1492
                , __FILE__, __FUNCTION__, __LINE__
1493
            );
1494
        }
1495
    }

modules/messages/EED_Messages.module.php 2 locations

@@ 965-984 (lines=20) @@
962
        } else {
963
            //can count how many sent by using the messages in the queue
964
            $sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent());
965
            if ($sent_count > 0) {
966
                EE_Error::add_success(
967
                    sprintf(
968
                        _n(
969
                            'There was %d message successfully sent.',
970
                            'There were %d messages successfully sent.',
971
                            $sent_count,
972
                            'event_espresso'
973
                        ),
974
                        $sent_count
975
                    )
976
                );
977
            } else {
978
                EE_Error::overwrite_errors();
979
                EE_Error::add_error(
980
                    __('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.
981
					If there was an error, you can look at the messages in the message activity list table for any error messages.',
982
                        'event_espresso'),
983
                    __FILE__, __FUNCTION__, __LINE__
984
                );
985
            }
986
        }
987
        return $sent_queue;
@@ 1030-1047 (lines=18) @@
1027
            || EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request
1028
        ) {
1029
            $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent);
1030
            if ($queue_count > 0) {
1031
                EE_Error::add_success(
1032
                    sprintf(
1033
                        _n(
1034
                            '%d message successfully sent.',
1035
                            '%d messages successfully sent.',
1036
                            $queue_count,
1037
                            'event_espresso'
1038
                        ),
1039
                        $queue_count
1040
                    )
1041
                );
1042
            } else {
1043
                EE_Error::add_error(
1044
                    __('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.',
1045
                        'event_espresso'),
1046
                    __FILE__, __FUNCTION__, __LINE__
1047
                );
1048
            }
1049
        } else {
1050
            EE_Error::add_error(

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

@@ 958-962 (lines=5) @@
955
            );
956
            $this->_redirect_after_action(false, '', '', $query_args, true);
957
        }
958
        if ($errors > 0) {
959
            EE_Error::add_error(
960
                sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors),
961
                __FILE__,
962
                __FUNCTION__,
963
                __LINE__
964
            );
965
        } else {