Code Duplication    Length = 17-19 lines in 2 locations

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

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

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

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