Code Duplication    Length = 4-12 lines in 2 locations

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

@@ 906-917 (lines=12) @@
903
					);
904
				}
905
			}
906
		} else {
907
			if ( $show_errors ) {
908
				EE_Error::add_error(
909
					sprintf(
910
						'%1$s||%1$s $attendee = %2$s',
911
						__( 'Either no Attendee information was found, or an invalid Attendee object was discovered when attempting to save your registration information.', 'event_espresso' ),
912
						var_export( $registration->attendee(), true )
913
					),
914
					__FILE__, __FUNCTION__, __LINE__
915
				);
916
			}
917
		}
918
	}
919
920

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

@@ 1017-1020 (lines=4) @@
1014
					// add relation to registration, set attendee ID, and cache attendee
1015
					$this->_associate_attendee_with_registration( $registration, $attendee );
1016
					// \EEH_Debug_Tools::printr( $registration, '$registration', __FILE__, __LINE__ );
1017
					if ( ! $registration->attendee() instanceof EE_Attendee ) {
1018
						EE_Error::add_error( sprintf( __( 'Registration %s has an invalid or missing Attendee object.', 'event_espresso' ), $reg_url_link ), __FILE__, __FUNCTION__, __LINE__ );
1019
						return false;
1020
					}
1021
					/** @type EE_Registration_Processor $registration_processor */
1022
					$registration_processor = EE_Registry::instance()->load_class( 'Registration_Processor' );
1023
					// at this point, we should have enough details about the registrant to consider the registration NOT incomplete