Code Duplication    Length = 4-4 lines in 2 locations

includes/gateways/stripe/includes/class-give-stripe-customer.php 2 locations

@@ 345-348 (lines=4) @@
342
			if ( give_stripe_is_checkout_enabled() ) {
343
				$token_details = $this->stripe_gateway->get_token_details( $this->payment_method_id );
344
				$new_card = $token_details->card;
345
			} elseif ( give_stripe_is_source_type( $this->payment_method_id, 'src' ) ) {
346
				$source_details = $this->stripe_gateway->get_source_details( $this->payment_method_id );
347
				$new_card = $source_details->card;
348
			}
349
350
			/**
351
			 * This filter hook is used to get new card details.
@@ 443-446 (lines=4) @@
440
			if ( give_stripe_is_source_type( $this->payment_method_id, 'tok' ) ) {
441
				$token_details = $this->stripe_gateway->get_token_details( $this->payment_method_id );
442
				$new_card      = $token_details->card;
443
			} elseif ( give_stripe_is_source_type( $this->payment_method_id, 'src' ) ) {
444
				$source_details = $this->stripe_gateway->get_source_details( $this->payment_method_id );
445
				$new_card       = $source_details->card;
446
			} elseif ( give_stripe_is_source_type( $this->payment_method_id, 'pm' ) ) {
447
				$payment_method_details = $this->stripe_gateway->payment_method->retrieve( $this->payment_method_id );
448
				$new_card               = $payment_method_details->card;
449
			}