Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 424-427 (lines=4) @@
421
                if (!empty($formFile)) {
422
423
                    $data = $this->getImportData($app, $formFile);
424
                    if ($data === false) {
425
                        $this->addErrors('CSVのフォーマットが一致しません。');
426
                        return $this->render($app, $form, $headers, $this->categoryTwig);
427
                    }
428
429
                    $keys = array_keys($headers);
430
                    $columnHeaders = $data->getColumnHeaders();
@@ 465-468 (lines=4) @@
462
                                return $this->render($app, $form, $headers, $this->categoryTwig);
463
                            }
464
                            $Category = $app['eccube.repository.category']->find($row['カテゴリID']);
465
                            if (!$Category) {
466
                                $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。');
467
                                return $this->render($app, $form, $headers, $this->categoryTwig);
468
                            }
469
                            if ($row['カテゴリID'] == $row['親カテゴリID']) {
470
                                $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。');
471
                                return $this->render($app, $form, $headers, $this->categoryTwig);
@@ 491-494 (lines=4) @@
488
                            }
489
490
                            $ParentCategory = $app['eccube.repository.category']->find($row['親カテゴリID']);
491
                            if (!$ParentCategory) {
492
                                $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。');
493
                                return $this->render($app, $form, $headers, $this->categoryTwig);
494
                            }
495
496
                        } else {
497
                            $ParentCategory = null;