Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 750-756 (lines=7) @@
747
			);
748
		}
749
750
		if ( WC()->cart->needs_shipping() ) {
751
			$items[] = array(
752
				'type'   => 'final',
753
				'label'  => __( 'Shipping', 'woocommerce-gateway-stripe' ),
754
				'amount' => $shipping,
755
			);
756
		}
757
758
		if ( WC()->cart->has_discount() ) {
759
			$items[] = array(
@@ 758-764 (lines=7) @@
755
			);
756
		}
757
758
		if ( WC()->cart->has_discount() ) {
759
			$items[] = array(
760
				'type'   => 'final',
761
				'label'  => __( 'Discount', 'woocommerce-gateway-stripe' ),
762
				'amount' => '-' . $discounts,
763
			);
764
		}
765
766
		return $items;
767
	}