Code Duplication    Length = 10-17 lines in 4 locations

modules/single_page_checkout/inc/EE_Checkout.class.php 1 location

@@ 995-1011 (lines=17) @@
992
                    );
993
                }
994
            }
995
        } else {
996
            if ($show_errors) {
997
                EE_Error::add_error(
998
                    sprintf(
999
                        '%1$s||%1$s $attendee = %2$s',
1000
                        __(
1001
                            'Either no Attendee information was found, or an invalid Attendee object was discovered when attempting to save your registration information.',
1002
                            'event_espresso'
1003
                        ),
1004
                        var_export($registration->attendee(), true)
1005
                    ),
1006
                    __FILE__,
1007
                    __FUNCTION__,
1008
                    __LINE__
1009
                );
1010
            }
1011
        }
1012
    }
1013
1014

modules/single_page_checkout/reg_steps/attendee_information/EE_SPCO_Reg_Step_Attendee_Information.class.php 1 location

@@ 1124-1139 (lines=16) @@
1121
                    // add relation to registration, set attendee ID, and cache attendee
1122
                    $this->_associate_attendee_with_registration($registration, $attendee);
1123
                    // \EEH_Debug_Tools::printr( $registration, '$registration', __FILE__, __LINE__ );
1124
                    if (! $registration->attendee() instanceof EE_Attendee) {
1125
                        EE_Error::add_error(
1126
                            sprintf(
1127
                                esc_html_x(
1128
                                    'Registration %s has an invalid or missing Attendee object.',
1129
                                    'Registration 123-456-789 has an invalid or missing Attendee object.',
1130
                                    'event_espresso'
1131
                                ),
1132
                                $reg_url_link
1133
                            ),
1134
                            __FILE__,
1135
                            __FUNCTION__,
1136
                            __LINE__
1137
                        );
1138
                        return false;
1139
                    }
1140
                    /** @type EE_Registration_Processor $registration_processor */
1141
                    $registration_processor = EE_Registry::instance()->load_class('Registration_Processor');
1142
                    // at this point, we should have enough details about the registrant to consider the registration

admin_pages/transactions/Transactions_Admin_Page.core.php 1 location

@@ 502-511 (lines=10) @@
499
            $this->_transaction->verify_abandoned_transaction_status();
500
        }
501
502
        if (! $this->_transaction instanceof EE_Transaction) {
503
            $error_msg = sprintf(
504
                esc_html__(
505
                    'An error occurred and the details for the transaction with the ID # %d could not be retrieved.',
506
                    'event_espresso'
507
                ),
508
                $TXN_ID
509
            );
510
            EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
511
        }
512
    }
513
514

core/EE_Session.core.php 1 location

@@ 588-602 (lines=15) @@
585
            return false;
586
        }
587
        foreach ($data as $key => $value) {
588
            if (isset($this->_default_session_vars[ $key ])) {
589
                EE_Error::add_error(
590
                    sprintf(
591
                        esc_html__(
592
                            'Sorry! %s is a default session datum and can not be reset.',
593
                            'event_espresso'
594
                        ),
595
                        $key
596
                    ),
597
                    __FILE__,
598
                    __FUNCTION__,
599
                    __LINE__
600
                );
601
                return false;
602
            }
603
            $this->_session_data[ $key ] = $value;
604
            $this->setSaveState();
605
        }