Code Duplication    Length = 5-5 lines in 2 locations

code/extensions/Order.php 2 locations

@@ 283-287 (lines=5) @@
280
                        ],
281
                        'UnitPrice' => round(floatval($product->getPrice()), $config->rounding_precision)
282
                    ];
283
                    if ($tax_class_name) {
284
                        $tax_calculator = new $tax_class_name;
285
                        $sales_order_line['LineTax'] = round($tax_calculator->value($item->Total()), $config->rounding_precision);
286
                        $sales_order_line['LineTaxCode'] = $tax_code;
287
                    }
288
                    $sales_order_lines[] = $sales_order_line;
289
                }
290
@@ 307-311 (lines=5) @@
304
                            ],
305
                            'UnitPrice' => round(floatval($modifier->Amount), $config->rounding_precision)
306
                        ];
307
                        if ($tax_class_name) {
308
                            $tax_calculator = new $tax_class_name;
309
                            $sales_order_line['LineTax'] = round($tax_calculator->value($modifier->Amount), $config->rounding_precision);
310
                            $sales_order_line['LineTaxCode'] = $tax_code;
311
                        }
312
                        $sales_order_lines[] = $sales_order_line;
313
                    }
314
                }