Code Duplication    Length = 5-5 lines in 6 locations

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

@@ 262-266 (lines=5) @@
259
                            $Product->setName(StringUtil::trimAll($row[$headerByKey['name']]));
260
                        }
261
262
                        if (isset($row[$headerByKey['note']]) && StringUtil::isNotBlank($row[$headerByKey['note']])) {
263
                            $Product->setNote(StringUtil::trimAll($row[$headerByKey['note']]));
264
                        } else {
265
                            $Product->setNote(null);
266
                        }
267
268
                        if (isset($row[$headerByKey['description_list']]) && StringUtil::isNotBlank($row[$headerByKey['description_list']])) {
269
                            $Product->setDescriptionList(StringUtil::trimAll($row[$headerByKey['description_list']]));
@@ 268-272 (lines=5) @@
265
                            $Product->setNote(null);
266
                        }
267
268
                        if (isset($row[$headerByKey['description_list']]) && StringUtil::isNotBlank($row[$headerByKey['description_list']])) {
269
                            $Product->setDescriptionList(StringUtil::trimAll($row[$headerByKey['description_list']]));
270
                        } else {
271
                            $Product->setDescriptionList(null);
272
                        }
273
274
                        if (isset($row[$headerByKey['description_detail']]) && StringUtil::isNotBlank($row[$headerByKey['description_detail']])) {
275
                            $Product->setDescriptionDetail(StringUtil::trimAll($row[$headerByKey['description_detail']]));
@@ 274-278 (lines=5) @@
271
                            $Product->setDescriptionList(null);
272
                        }
273
274
                        if (isset($row[$headerByKey['description_detail']]) && StringUtil::isNotBlank($row[$headerByKey['description_detail']])) {
275
                            $Product->setDescriptionDetail(StringUtil::trimAll($row[$headerByKey['description_detail']]));
276
                        } else {
277
                            $Product->setDescriptionDetail(null);
278
                        }
279
280
                        if (isset($row[$headerByKey['search_word']]) && StringUtil::isNotBlank($row[$headerByKey['search_word']])) {
281
                            $Product->setSearchWord(StringUtil::trimAll($row[$headerByKey['search_word']]));
@@ 280-284 (lines=5) @@
277
                            $Product->setDescriptionDetail(null);
278
                        }
279
280
                        if (isset($row[$headerByKey['search_word']]) && StringUtil::isNotBlank($row[$headerByKey['search_word']])) {
281
                            $Product->setSearchWord(StringUtil::trimAll($row[$headerByKey['search_word']]));
282
                        } else {
283
                            $Product->setSearchWord(null);
284
                        }
285
286
                        if (isset($row[$headerByKey['free_area']]) && StringUtil::isNotBlank($row[$headerByKey['free_area']])) {
287
                            $Product->setFreeArea(StringUtil::trimAll($row[$headerByKey['free_area']]));
@@ 286-290 (lines=5) @@
283
                            $Product->setSearchWord(null);
284
                        }
285
286
                        if (isset($row[$headerByKey['free_area']]) && StringUtil::isNotBlank($row[$headerByKey['free_area']])) {
287
                            $Product->setFreeArea(StringUtil::trimAll($row[$headerByKey['free_area']]));
288
                        } else {
289
                            $Product->setFreeArea(null);
290
                        }
291
292
                        // 商品画像登録
293
                        $this->createProductImage($row, $Product, $data, $headerByKey);
@@ 961-965 (lines=5) @@
958
            }
959
        }
960
961
        if (isset($row[$headerByKey['product_code']]) && StringUtil::isNotBlank($row[$headerByKey['product_code']])) {
962
            $ProductClass->setCode(StringUtil::trimAll($row[$headerByKey['product_code']]));
963
        } else {
964
            $ProductClass->setCode(null);
965
        }
966
967
        if (!isset($row[$headerByKey['stock_unlimited']])
968
            || StringUtil::isBlank($row[$headerByKey['stock_unlimited']])