x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.

Code Duplication    Length = 5-5 lines in 2 locations

code/model/ComplexPriceObject.php 2 locations

@@ 79-83 (lines=5) @@
76
        } else {
77
            $fields->removeByName("Groups");
78
        }
79
        if ($ecommerceCountries = EcommerceCountry::get()) {
80
            $fields->replaceField("EcommerceCountries", new CheckboxSetField("EcommerceCountries", "Where", $ecommerceCountries->map()->toArray()));
81
        } else {
82
            $fields->removeByName("EcommerceCountries");
83
        }
84
        if (DiscountCouponOption::get()->count()) {
85
            $fields->replaceField("DiscountCouponOptions", new CheckboxSetField("DiscountCouponOptions", "Discount Coupons", DiscountCouponOption::get()->map()->toArray()));
86
        } else {
@@ 84-88 (lines=5) @@
81
        } else {
82
            $fields->removeByName("EcommerceCountries");
83
        }
84
        if (DiscountCouponOption::get()->count()) {
85
            $fields->replaceField("DiscountCouponOptions", new CheckboxSetField("DiscountCouponOptions", "Discount Coupons", DiscountCouponOption::get()->map()->toArray()));
86
        } else {
87
            $fields->removeByName("DiscountCouponOptions");
88
        }
89
90
        $from->setConfig('showcalendar', true);
91
        $until->setConfig('showcalendar', true);