Code Duplication    Length = 14-14 lines in 2 locations

includes/payment-methods/class-wc-stripe-payment-request.php 2 locations

@@ 220-233 (lines=14) @@
217
			);
218
		}
219
220
		if ( wc_shipping_enabled() && $product->needs_shipping() ) {
221
			$items[] = array(
222
				'label'   => __( 'Shipping', 'woocommerce-gateway-stripe' ),
223
				'amount'  => 0,
224
				'pending' => true,
225
			);
226
227
			$data['shippingOptions']  = array(
228
				'id'     => 'pending',
229
				'label'  => __( 'Pending', 'woocommerce-gateway-stripe' ),
230
				'detail' => '',
231
				'amount' => 0,
232
			);
233
		}
234
235
		$data['displayItems'] = $items;
236
		$data['total'] = array(
@@ 758-771 (lines=14) @@
755
			);
756
		}
757
758
		if ( wc_shipping_enabled() && $product->needs_shipping() ) {
759
			$items[] = array(
760
				'label'   => __( 'Shipping', 'woocommerce-gateway-stripe' ),
761
				'amount'  => 0,
762
				'pending' => true,
763
			);
764
765
			$data['shippingOptions']  = array(
766
				'id'     => 'pending',
767
				'label'  => __( 'Pending', 'woocommerce-gateway-stripe' ),
768
				'detail' => '',
769
				'amount' => 0,
770
			);
771
		}
772
773
		$data['displayItems'] = $items;
774
		$data['total'] = array(