Code Duplication    Length = 8-9 lines in 2 locations

modules/single_page_checkout/EED_Single_Page_Checkout.module.php 2 locations

@@ 680-688 (lines=9) @@
677
				FALSE
678
			);
679
			// did we gets the goods ?
680
			if ( $reg_step_obj instanceof EE_SPCO_Reg_Step ) {
681
				// set reg step order based on config
682
				$reg_step_obj->set_order( $order );
683
				// add instantiated reg step object to the master reg steps array
684
				$this->checkout->add_reg_step( $reg_step_obj );
685
			} else {
686
				EE_Error::add_error(
687
					__( 'The current step could not be set.', 'event_espresso' ),
688
					__FILE__, __FUNCTION__, __LINE__
689
				);
690
				return false;
691
			}
@@ 727-734 (lines=8) @@
724
		// because the reg_url_link is present in the request, this is a return visit to SPCO, so we'll get the transaction data from the db
725
		$transaction = $TXN_model->get_transaction_from_reg_url_link( $this->checkout->reg_url_link );
726
		// verify transaction
727
		if ( $transaction instanceof EE_Transaction ) {
728
			// and get the cart that was used for that transaction
729
			$this->checkout->cart = $this->_get_cart_for_transaction( $transaction );
730
			return $transaction;
731
		} else {
732
			EE_Error::add_error( __( 'Your Registration and Transaction information could not be retrieved from the db.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__);
733
			return NULL;
734
		}
735
	}
736
737