Code Duplication    Length = 3-7 lines in 2 locations

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

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

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

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