Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 483-488 (lines=6) @@
480
				if ( $source->id === $stripe_source_id ) {
481
					$found_source = true;
482
483
					if ( $card ) {
484
						/* translators: 1) card brand 2) last 4 digits */
485
						$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 );
486
					} else {
487
						$payment_method_to_display = __( 'N/A', 'woocommerce-gateway-stripe' );
488
					}
489
					break;
490
				}
491
			}
@@ 498-503 (lines=6) @@
495
					$card = $sources[0]->card;
496
				}
497
498
				if ( $card ) {
499
					/* translators: 1) card brand 2) last 4 digits */
500
					$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 );
501
				} else {
502
					$payment_method_to_display = __( 'N/A', 'woocommerce-gateway-stripe' );
503
				}
504
			}
505
		}
506