Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 862-868 (lines=7) @@
859
		$item_total  = wc_format_decimal( WC()->cart->cart_contents_total, $decimals ) + $discounts;
860
		$order_total = wc_format_decimal( $item_total + $tax + $shipping, $decimals );
861
862
		if ( wc_tax_enabled() ) {
863
			$items[] = array(
864
				'type'   => 'final',
865
				'label'  => esc_html( __( 'Tax', 'woocommerce-gateway-stripe' ) ),
866
				'amount' => $tax,
867
			);
868
		}
869
870
		if ( WC()->cart->needs_shipping() && $this->is_shipping_enabled ) {
871
			$items[] = array(
@@ 878-884 (lines=7) @@
875
			);
876
		}
877
878
		if ( WC()->cart->has_discount() ) {
879
			$items[] = array(
880
				'type'   => 'final',
881
				'label'  => esc_html( __( 'Discount', 'woocommerce-gateway-stripe' ) ),
882
				'amount' => '-' . $discounts,
883
			);
884
		}
885
886
		return $items;
887
	}