Code Duplication    Length = 7-7 lines in 2 locations

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

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