Code Duplication    Length = 4-4 lines in 2 locations

includes/compat/class-wc-stripe-sepa-subs-compat.php 1 location

@@ 178-181 (lines=4) @@
175
			$subscription    = wc_get_order( $order_id );
176
			$prepared_source = $this->prepare_source( get_current_user_id(), true );
177
178
			if ( empty( $prepared_source->source ) ) {
179
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
180
				throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
181
			}
182
183
			$this->save_source_to_order( $subscription, $prepared_source );
184

includes/class-wc-gateway-stripe.php 1 location

@@ 495-498 (lines=4) @@
492
	 * @throws WC_Stripe_Exception     An exception if the source ID is missing.
493
	 */
494
	public function check_source( $prepared_source ) {
495
		if ( empty( $prepared_source->source ) ) {
496
			$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );
497
			throw new WC_Stripe_Exception( print_r( $prepared_source, true ), $localized_message );
498
		}
499
	}
500
501
	/**