Code Duplication    Length = 6-6 lines in 2 locations

includes/compat/class-wc-stripe-subs-compat.php 2 locations

@@ 482-487 (lines=6) @@
479
				if ( $source->id === $stripe_source_id ) {
480
					$found_source = true;
481
482
					if ( $card ) {
483
						/* translators: 1) card brand 2) last 4 digits */
484
						$payment_method_to_display = sprintf( __( 'Via %1$s card ending in %2$s', 'woocommerce-gateway-stripe' ), ( isset( $card->brand ) ? $card->brand : __( 'N/A', 'woocommerce-gateway-stripe' ) ), $card->last4 );
485
					} else {
486
						$payment_method_to_display = __( 'N/A', 'woocommerce-gateway-stripe' );
487
					}
488
					break;
489
				}
490
			}
@@ 497-502 (lines=6) @@
494
					$card = $sources[0]->card;
495
				}
496
497
				if ( $card ) {
498
					/* translators: 1) card brand 2) last 4 digits */
499
					$payment_method_to_display = sprintf( __( 'Via %1$s card ending in %2$s', 'woocommerce-gateway-stripe' ), ( isset( $card->brand ) ? $card->brand : __( 'N/A', 'woocommerce-gateway-stripe' ) ), $card->last4 );
500
				} else {
501
					$payment_method_to_display = __( 'N/A', 'woocommerce-gateway-stripe' );
502
				}
503
			}
504
		}
505