Code Duplication    Length = 9-9 lines in 2 locations

includes/class-wc-stripe-apple-pay.php 1 location

@@ 360-368 (lines=9) @@
357
				),
358
			);
359
		}
360
		if ( 0 < $tax_total ) {
361
			$data['items'][] = array(
362
				'label'  => __( 'Tax', 'woocommerce-gateway-stripe' ),
363
				'amount' => array(
364
					'currency' => $currency,
365
					'value'    => $tax_total,
366
				),
367
			);
368
		}
369
370
		wp_send_json( array( 'success' => 'true', 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
371
	}

includes/class-wc-stripe-payment-request.php 1 location

@@ 346-354 (lines=9) @@
343
			);
344
		}
345
		// The tax total may include the shipping taxes if a shipping option is provided.
346
		if ( 0 < $tax_total ) {
347
			$items[] = array(
348
				'label'  => __( 'Tax', 'woocommerce-gateway-stripe' ),
349
				'amount' => array(
350
					'currency' => $currency,
351
					'value'    => $tax_total,
352
				),
353
			);
354
		}
355
		return $items;
356
	}
357
}