Code Duplication    Length = 5-5 lines in 2 locations

code/extensions/Order.php 2 locations

@@ 254-258 (lines=5) @@
251
                        ],
252
                        'UnitPrice' => round(floatval($product->getPrice()), $config->rounding_precision)
253
                    ];
254
                    if ($tax_class_name) {
255
                        $tax_calculator = new $tax_class_name;
256
                        $sales_order_line['LineTax'] = round($tax_calculator->value($item->Total()), $config->rounding_precision);
257
                        $sales_order_line['LineTaxCode'] = $tax_code;
258
                    }
259
                    $sales_order_lines[] = $sales_order_line;
260
                }
261
@@ 278-282 (lines=5) @@
275
                            ],
276
                            'UnitPrice' => round(floatval($modifier->Amount), $config->rounding_precision)
277
                        ];
278
                        if ($tax_class_name) {
279
                            $tax_calculator = new $tax_class_name;
280
                            $sales_order_line['LineTax'] = round($tax_calculator->value($modifier->Amount), $config->rounding_precision);
281
                            $sales_order_line['LineTaxCode'] = $tax_code;
282
                        }
283
                        $sales_order_lines[] = $sales_order_line;
284
                    }
285
                }