Code Duplication    Length = 17-19 lines in 2 locations

src/Eccube/Controller/Admin/Product/CategoryController.php 1 location

@@ 213-229 (lines=17) @@
210
211
            // データ行の出力.
212
            $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
213
            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
214
215
                $Csvs = $csvService->getCsvs();
216
217
                /** @var $Category \Eccube\Entity\Category */
218
                $Category = $entity;
219
220
                // CSV出力項目と合致するデータを取得.
221
                $row = array();
222
                foreach ($Csvs as $Csv) {
223
                    $row[] = $csvService->getData($Csv, $Category);
224
                }
225
226
                //$row[] = number_format(memory_get_usage(true));
227
                // 出力.
228
                $csvService->fputcsv($row);
229
            });
230
        });
231
232
        $now = new \DateTime();

src/Eccube/Controller/Admin/Customer/CustomerController.php 1 location

@@ 252-270 (lines=19) @@
249
250
            // データ行の出力.
251
            $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
252
            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
253
254
                $Csvs = $csvService->getCsvs();
255
256
                /** @var $Customer \Eccube\Entity\Customer */
257
                $Customer = $entity;
258
259
                $row = array();
260
261
                // CSV出力項目と合致するデータを取得.
262
                foreach ($Csvs as $Csv) {
263
                    // 会員データを検索.
264
                    $row[] = $csvService->getData($Csv, $Customer);
265
                }
266
267
                //$row[] = number_format(memory_get_usage(true));
268
                // 出力.
269
                $csvService->fputcsv($row);
270
            });
271
        });
272
273
        $now = new \DateTime();