Code Duplication    Length = 17-19 lines in 2 locations

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

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

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

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