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

@@ 241-259 (lines=19) @@
238
239
            // データ行の出力.
240
            $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
241
            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
242
243
                $Csvs = $csvService->getCsvs();
244
245
                /** @var $Customer \Eccube\Entity\Customer */
246
                $Customer = $entity;
247
248
                $row = array();
249
250
                // CSV出力項目と合致するデータを取得.
251
                foreach ($Csvs as $Csv) {
252
                    // 会員データを検索.
253
                    $row[] = $csvService->getData($Csv, $Customer);
254
                }
255
256
                //$row[] = number_format(memory_get_usage(true));
257
                // 出力.
258
                $csvService->fputcsv($row);
259
            });
260
        });
261
262
        $now = new \DateTime();