Code Duplication    Length = 17-19 lines in 2 locations

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

@@ 188-206 (lines=19) @@
185
186
            // データ行の出力.
187
            $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
188
            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
189
190
                $Csvs = $csvService->getCsvs();
191
192
                /** @var $Customer \Eccube\Entity\Customer */
193
                $Customer = $entity;
194
195
                $row = array();
196
197
                // CSV出力項目と合致するデータを取得.
198
                foreach ($Csvs as $Csv) {
199
                    // 会員データを検索.
200
                    $row[] = $csvService->getData($Csv, $Customer);
201
                }
202
203
                //$row[] = number_format(memory_get_usage(true));
204
                // 出力.
205
                $csvService->fputcsv($row);
206
            });
207
        });
208
209
        $now = new \DateTime();

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

@@ 181-197 (lines=17) @@
178
179
            // データ行の出力.
180
            $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
181
            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
182
183
                $Csvs = $csvService->getCsvs();
184
185
                /** @var $Category \Eccube\Entity\Category */
186
                $Category = $entity;
187
188
                // CSV出力項目と合致するデータを取得.
189
                $row = array();
190
                foreach ($Csvs as $Csv) {
191
                    $row[] = $csvService->getData($Csv, $Category);
192
                }
193
194
                //$row[] = number_format(memory_get_usage(true));
195
                // 出力.
196
                $csvService->fputcsv($row);
197
            });
198
        });
199
200
        $now = new \DateTime();