Code Duplication    Length = 6-8 lines in 2 locations

src/Eccube/Controller/Admin/Product/CsvImportController.php 2 locations

@@ 186-193 (lines=8) @@
183
184
                        if ($row['商品削除フラグ'] == '') {
185
                            $Product->setDelFlg(Constant::DISABLED);
186
                        } else {
187
                            if ($row['商品削除フラグ'] == (string)Constant::DISABLED || $row['商品削除フラグ'] == (string)Constant::ENABLED) {
188
                                $Product->setDelFlg($row['商品削除フラグ']);
189
                            } else {
190
                                $this->addErrors(($data->key() + 1) . '行目の商品削除フラグが設定されていません。');
191
                                return $this->render($app, $form, $headers, $this->productTwig);
192
                            }
193
                        }
194
195
                        // 商品画像登録
196
                        $this->createProductImage($row, $Product);
@@ 525-530 (lines=6) @@
522
                            $Category->setDelFlg(Constant::DISABLED);
523
                            $status = $app['eccube.repository.category']->save($Category);
524
                        } else {
525
                            if ($row['カテゴリ削除フラグ'] == (string)Constant::DISABLED || $row['カテゴリ削除フラグ'] == (string)Constant::ENABLED) {
526
                                $Category->setDelFlg($row['カテゴリ削除フラグ']);
527
                            } else {
528
                                $this->addErrors(($data->key() + 1) . '行目のカテゴリ削除フラグが設定されていません。');
529
                                return $this->render($app, $form, $headers, $this->categoryTwig);
530
                            }
531
532
                            if ($row['カテゴリ削除フラグ'] == (string)Constant::ENABLED) {
533
                                $status = $app['eccube.repository.category']->delete($Category);