Code Duplication    Length = 5-5 lines in 2 locations

payment_methods/Paypal_Express/EEG_Paypal_Express.gateway.php 2 locations

@@ 110-114 (lines=5) @@
107
			return $payment;
108
		}
109
		$transaction = $payment->transaction();
110
		if ( ! $transaction instanceof EEI_Transaction ) {
111
			$payment->set_gateway_response( __( 'Could not process this payment because it has no associated transaction.', 'event_espresso' ) );
112
			$payment->set_status( $this->_pay_model->failed_status() );
113
			return $payment;
114
		}
115
		$order_description = substr( sprintf( __('Event Registrations from %s', 'event_espresso'), get_bloginfo('name') ), 0, 127 );
116
		$primary_registration = $transaction->primary_registration();
117
		$primary_attendee = $primary_registration instanceof EE_Registration ? $primary_registration->attendee() : false;
@@ 274-278 (lines=5) @@
271
272
			$payment_details = $payment->details();
273
			$transaction = $payment->transaction();
274
			if ( ! $transaction instanceof EEI_Transaction ) {
275
				$payment->set_gateway_response( __( 'Could not process this payment because it has no associated transaction.', 'event_espresso' ) );
276
				$payment->set_status( $this->_pay_model->failed_status() );
277
				return $payment;
278
			}
279
			$primary_registrant = $transaction->primary_registration();
280
281
			// Check if we still have the token.