Code Duplication    Length = 3-7 lines in 2 locations

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

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

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

@@ 254-256 (lines=3) @@
251
                $ProductClasses = $Product->getProductClasses();
252
                $ProductClass = $ProductClasses[0];
253
                $BaseInfo = $app['eccube.repository.base_info']->get();
254
                if ($BaseInfo->getOptionProductTaxRule() == Constant::ENABLED && $ProductClass->getTaxRule() && !$ProductClass->getTaxRule()->getDelFlg()) {
255
                    $ProductClass->setTaxRate($ProductClass->getTaxRule()->getTaxRate());
256
                }
257
                $ProductStock = $ProductClasses[0]->getProductStock();
258
            }
259
        }