Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 1185-1197 (lines=13) @@
1182
            }
1183
        }
1184
1185
        if (isset($row[$headerByKey['price02']]) && StringUtil::isNotBlank($row[$headerByKey['price02']])) {
1186
            $price02 = str_replace(',', '', $row[$headerByKey['price02']]);
1187
            $errors = $this->validator->validate($price02, new GreaterThanOrEqual(['value' => 0]));
1188
            if ($errors->count() === 0) {
1189
                $ProductClass->setPrice02($price02);
1190
            } else {
1191
                $message = trans('admin.common.csv_invalid_greater_than_zero', ['%line%' => $line, '%name%' => $headerByKey['price02']]);
1192
                $this->addErrors($message);
1193
            }
1194
        } else {
1195
            $message = trans('admin.common.csv_invalid_required', ['%line%' => $line, '%name%' => $headerByKey['price02']]);
1196
            $this->addErrors($message);
1197
        }
1198
1199
        if ($this->BaseInfo->isOptionProductDeliveryFee()) {
1200
            if (isset($row[$headerByKey['delivery_fee']]) && StringUtil::isNotBlank($row[$headerByKey['delivery_fee']])) {
@@ 1363-1375 (lines=13) @@
1360
            }
1361
        }
1362
1363
        if (!isset($row[$headerByKey['price02']]) || $row[$headerByKey['price02']] == '') {
1364
            $message = trans('admin.common.csv_invalid_required', ['%line%' => $line, '%name%' => $headerByKey['price02']]);
1365
            $this->addErrors($message);
1366
        } else {
1367
            $price02 = str_replace(',', '', $row[$headerByKey['price02']]);
1368
            $errors = $this->validator->validate($price02, new GreaterThanOrEqual(['value' => 0]));
1369
            if ($errors->count() === 0) {
1370
                $ProductClass->setPrice02($price02);
1371
            } else {
1372
                $message = trans('admin.common.csv_invalid_greater_than_zero', ['%line%' => $line, '%name%' => $headerByKey['price02']]);
1373
                $this->addErrors($message);
1374
            }
1375
        }
1376
1377
        $ProductStock = $ProductClass->getProductStock();
1378