Code Duplication    Length = 3-3 lines in 8 locations

includes/cli/class-wc-cli-order.php 4 locations

@@ 970-972 (lines=3) @@
967
		}
968
969
		// total
970
		if ( isset( $item['total'] ) ) {
971
			$item_args['totals']['total'] = floatval( $item['total'] );
972
		}
973
974
		// total tax
975
		if ( isset( $item['total_tax'] ) ) {
@@ 975-977 (lines=3) @@
972
		}
973
974
		// total tax
975
		if ( isset( $item['total_tax'] ) ) {
976
			$item_args['totals']['tax'] = floatval( $item['total_tax'] );
977
		}
978
979
		// subtotal
980
		if ( isset( $item['subtotal'] ) ) {
@@ 980-982 (lines=3) @@
977
		}
978
979
		// subtotal
980
		if ( isset( $item['subtotal'] ) ) {
981
			$item_args['totals']['subtotal'] = floatval( $item['subtotal'] );
982
		}
983
984
		// subtotal tax
985
		if ( isset( $item['subtotal_tax'] ) ) {
@@ 985-987 (lines=3) @@
982
		}
983
984
		// subtotal tax
985
		if ( isset( $item['subtotal_tax'] ) ) {
986
			$item_args['totals']['subtotal_tax'] = floatval( $item['subtotal_tax'] );
987
		}
988
989
		if ( $creating ) {
990

includes/api/class-wc-api-orders.php 4 locations

@@ 963-965 (lines=3) @@
960
		}
961
962
		// total
963
		if ( isset( $item['total'] ) ) {
964
			$item_args['totals']['total'] = floatval( $item['total'] );
965
		}
966
967
		// total tax
968
		if ( isset( $item['total_tax'] ) ) {
@@ 968-970 (lines=3) @@
965
		}
966
967
		// total tax
968
		if ( isset( $item['total_tax'] ) ) {
969
			$item_args['totals']['tax'] = floatval( $item['total_tax'] );
970
		}
971
972
		// subtotal
973
		if ( isset( $item['subtotal'] ) ) {
@@ 973-975 (lines=3) @@
970
		}
971
972
		// subtotal
973
		if ( isset( $item['subtotal'] ) ) {
974
			$item_args['totals']['subtotal'] = floatval( $item['subtotal'] );
975
		}
976
977
		// subtotal tax
978
		if ( isset( $item['subtotal_tax'] ) ) {
@@ 978-980 (lines=3) @@
975
		}
976
977
		// subtotal tax
978
		if ( isset( $item['subtotal_tax'] ) ) {
979
			$item_args['totals']['subtotal_tax'] = floatval( $item['subtotal_tax'] );
980
		}
981
982
		if ( $creating ) {
983