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

@@ 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();