Code Duplication    Length = 7-7 lines in 2 locations

includes/class-wc-stripe-apple-pay.php 2 locations

@@ 503-509 (lines=7) @@
500
			);
501
		}
502
503
		if ( WC()->cart->needs_shipping() ) {
504
			$items[] = array(
505
				'type'   => 'final',
506
				'label'  => __( 'Shipping', 'woocommerce-gateway-stripe' ),
507
				'amount' => $shipping,
508
			);
509
		}
510
511
		if ( WC()->cart->has_discount() ) {
512
			$items[] = array(
@@ 511-517 (lines=7) @@
508
			);
509
		}
510
511
		if ( WC()->cart->has_discount() ) {
512
			$items[] = array(
513
				'type'   => 'final',
514
				'label'  => __( 'Discount', 'woocommerce-gateway-stripe' ),
515
				'amount' => $discounts,
516
			);
517
		}
518
519
		return $items;
520
	}