Code Duplication    Length = 3-7 lines in 2 locations

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

@@ 193-199 (lines=7) @@
190
191
            // 商品税率が設定されている場合、商品税率を項目に設定
192
            $BaseInfo = $app['eccube.repository.base_info']->get();
193
            if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED) {
194
                foreach ($ProductClasses as $class) {
195
                    if ($class->getTaxRule() && !$class->getTaxRule()->getDelFlg()) {
196
                        $class->setTaxRate($class->getTaxRule()->getTaxRate());
197
                    }
198
                }
199
            }
200
201
            // 登録済み商品規格と空の商品規格をマージ
202
            $flag = false;

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

@@ 279-281 (lines=3) @@
276
                $ProductClasses = $Product->getProductClasses();
277
                $ProductClass = $ProductClasses[0];
278
                $BaseInfo = $app['eccube.repository.base_info']->get();
279
                if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED && $ProductClass->getTaxRule() && !$ProductClass->getTaxRule()->getDelFlg()) {
280
                    $ProductClass->setTaxRate($ProductClass->getTaxRule()->getTaxRate());
281
                }
282
                $ProductStock = $ProductClasses[0]->getProductStock();
283
            }
284
        }