Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 166-170 (lines=5) @@
163
164
                    $columnHeaders = $data->getColumnHeaders();
165
166
                    if (count(array_diff($requireHeader, $columnHeaders)) > 0) {
167
                        $this->addErrors(trans('admin.common.csv_invalid_format'));
168
169
                        return $this->renderWithError($form, $headers, false);
170
                    }
171
172
                    $size = count($data);
173
@@ 572-576 (lines=5) @@
569
                    $headerByKey = array_flip(array_map($getId, $headers));
570
571
                    $columnHeaders = $data->getColumnHeaders();
572
                    if (count(array_diff($requireHeader, $columnHeaders)) > 0) {
573
                        $this->addErrors(trans('admin.common.csv_invalid_format'));
574
575
                        return $this->renderWithError($form, $headers, false);
576
                    }
577
578
                    $size = count($data);
579
                    if ($size < 1) {