Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 807-813 (lines=7) @@
804
		$item_total  = wc_format_decimal( WC()->cart->cart_contents_total, $decimals ) + $discounts;
805
		$order_total = wc_format_decimal( $item_total + $tax + $shipping, $decimals );
806
807
		if ( wc_tax_enabled() ) {
808
			$items[] = array(
809
				'type'   => 'final',
810
				'label'  => esc_html( __( 'Tax', 'woocommerce-gateway-stripe' ) ),
811
				'amount' => $tax,
812
			);
813
		}
814
815
		if ( WC()->cart->needs_shipping() ) {
816
			$items[] = array(
@@ 815-821 (lines=7) @@
812
			);
813
		}
814
815
		if ( WC()->cart->needs_shipping() ) {
816
			$items[] = array(
817
				'type'   => 'final',
818
				'label'  => esc_html( __( 'Shipping', 'woocommerce-gateway-stripe' ) ),
819
				'amount' => $shipping,
820
			);
821
		}
822
823
		if ( WC()->cart->has_discount() ) {
824
			$items[] = array(
@@ 823-829 (lines=7) @@
820
			);
821
		}
822
823
		if ( WC()->cart->has_discount() ) {
824
			$items[] = array(
825
				'type'   => 'final',
826
				'label'  => esc_html( __( 'Discount', 'woocommerce-gateway-stripe' ) ),
827
				'amount' => '-' . $discounts,
828
			);
829
		}
830
831
		return $items;
832
	}