Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 832-838 (lines=7) @@
829
		$item_total  = wc_format_decimal( WC()->cart->cart_contents_total, $decimals ) + $discounts;
830
		$order_total = wc_format_decimal( $item_total + $tax + $shipping, $decimals );
831
832
		if ( wc_tax_enabled() ) {
833
			$items[] = array(
834
				'type'   => 'final',
835
				'label'  => esc_html( __( 'Tax', 'woocommerce-gateway-stripe' ) ),
836
				'amount' => $tax,
837
			);
838
		}
839
840
		if ( WC()->cart->needs_shipping() ) {
841
			$items[] = array(
@@ 840-846 (lines=7) @@
837
			);
838
		}
839
840
		if ( WC()->cart->needs_shipping() ) {
841
			$items[] = array(
842
				'type'   => 'final',
843
				'label'  => esc_html( __( 'Shipping', 'woocommerce-gateway-stripe' ) ),
844
				'amount' => $shipping,
845
			);
846
		}
847
848
		if ( WC()->cart->has_discount() ) {
849
			$items[] = array(
@@ 848-854 (lines=7) @@
845
			);
846
		}
847
848
		if ( WC()->cart->has_discount() ) {
849
			$items[] = array(
850
				'type'   => 'final',
851
				'label'  => esc_html( __( 'Discount', 'woocommerce-gateway-stripe' ) ),
852
				'amount' => '-' . $discounts,
853
			);
854
		}
855
856
		return $items;
857
	}