Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 676-684 (lines=9) @@
673
				),
674
			);
675
		}
676
		if ( 0 < $tax_total ) {
677
			$data['items'][] = array(
678
				'label'  => __( 'Tax', 'woocommerce-gateway-stripe' ),
679
				'amount' => array(
680
					'currency' => $currency,
681
					'value'    => $tax_total,
682
				),
683
			);
684
		}
685
686
		wp_send_json( array( 'success' => 'true', 'line_items' => $this->build_line_items(), 'total' => WC()->cart->total ) );
687
	}

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

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