Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 313-319 (lines=7) @@
310
			);
311
		}
312
313
		if ( WC()->cart->needs_shipping() ) {
314
			$items[] = array(
315
				'type'   => 'final',
316
				'label'  => __( 'Shipping', 'woocommerce-gateway-stripe' ),
317
				'amount' => $shipping,
318
			);
319
		}
320
321
		if ( WC()->cart->has_discount() ) {
322
			$items[] = array(
@@ 321-327 (lines=7) @@
318
			);
319
		}
320
321
		if ( WC()->cart->has_discount() ) {
322
			$items[] = array(
323
				'type'   => 'final',
324
				'label'  => __( 'Discount', 'woocommerce-gateway-stripe' ),
325
				'amount' => $discounts,
326
			);
327
		}
328
329
		return $items;
330
	}