Code Duplication    Length = 5-8 lines in 2 locations

modules/single_page_checkout/inc/EE_Checkout.class.php 2 locations

@@ 939-943 (lines=5) @@
936
                // save changes
937
                $registration->save();
938
                // update txn cache
939
                if (! $this->transaction->update_cache_after_object_save('Registration', $registration)) {
940
                    if ($show_errors) {
941
                        EE_Error::add_error(
942
                            __(
943
                                'The newly saved Registration object could not be cached on the Transaction.',
944
                                'event_espresso'
945
                            ),
946
                            __FILE__,
@@ 982-989 (lines=8) @@
979
        if ($registration->attendee() instanceof EE_Attendee) {
980
            // save so that ATT has ID
981
            $registration->attendee()->save();
982
            if (! $registration->update_cache_after_object_save('Attendee', $registration->attendee())) {
983
                if ($show_errors) {
984
                    EE_Error::add_error(
985
                        __(
986
                            'The newly saved Attendee object could not be cached on the registration.',
987
                            'event_espresso'
988
                        ),
989
                        __FILE__,
990
                        __FUNCTION__,
991
                        __LINE__
992
                    );