Code Duplication    Length = 3-7 lines in 2 locations

src/Eccube/Controller/Admin/Product/ProductClassController.php 1 location

@@ 276-282 (lines=7) @@
273
274
            // 商品税率が設定されている場合、商品税率を項目に設定
275
            $BaseInfo = $this->baseInfoRepository->get();
276
            if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED) {
277
                foreach ($ProductClasses as $class) {
278
                    if ($class->getTaxRule() && !$class->getTaxRule()->getDelFlg()) {
279
                        $class->setTaxRate($class->getTaxRule()->getTaxRate());
280
                    }
281
                }
282
            }
283
284
            // 登録済み商品規格と空の商品規格をマージ
285
            $flag = false;

src/Eccube/Controller/Admin/Product/ProductController.php 1 location

@@ 376-378 (lines=3) @@
373
                $ProductClasses = $Product->getProductClasses();
374
                $ProductClass = $ProductClasses[0];
375
                $BaseInfo = $this->baseInfoRepository->get();
376
                if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED && $ProductClass->getTaxRule() && !$ProductClass->getTaxRule()->getDelFlg()) {
377
                    $ProductClass->setTaxRate($ProductClass->getTaxRule()->getTaxRate());
378
                }
379
                $ProductStock = $ProductClasses[0]->getProductStock();
380
            }
381
        }