Code Duplication    Length = 6-6 lines in 2 locations

code/modifiers/GSTTaxModifier.php 2 locations

@@ 441-446 (lines=6) @@
438
                    }
439
                    $totalForItem = $item->Total();
440
                    $functionName = $this->config()->get("order_item_function_for_tax_exclusive_portion");
441
                    if ($functionName) {
442
                        if ($item->hasMethod($functionName)) {
443
                            $this->debugMessage .= "<hr />running $functionName on ".$item->ClassName.".".$item->ID;
444
                            $totalForItem -= $item->$functionName();
445
                        }
446
                    }
447
                    //turnRateIntoCalculationRate is really important -
448
                    //a 10% rate is different for inclusive than for an exclusive tax
449
                    $actualCalculationRate = $this->turnRateIntoCalculationRate($actualRate);
@@ 531-536 (lines=6) @@
528
                            }
529
                            $totalForModifier = $modifier->CalculationTotal();
530
                            $functionName = $this->config()->get("order_item_function_for_tax_exclusive_portion");
531
                            if ($functionName) {
532
                                if ($modifier->hasMethod($functionName)) {
533
                                    $totalForModifier -= $item->$functionName();
534
                                    $this->debugMessage .= "<hr />running $functionName on ".$modifier->ClassName.".".$modifier->ID;
535
                                }
536
                            }
537
                            //turnRateIntoCalculationRate is really important -
538
                            //a 10% rate is different for inclusive than for an exclusive tax
539
                            $actualRateCalculationRate = $this->turnRateIntoCalculationRate($actualRate);