@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $em->getConfiguration()->setSQLLogger(null); |
172 | 172 | |
173 | 173 | $response = new StreamedResponse(); |
174 | - $response->setCallback(function () use ($app, $request, $em) { |
|
174 | + $response->setCallback(function() use ($app, $request, $em) { |
|
175 | 175 | |
176 | 176 | // CSV種別を元に初期化. |
177 | 177 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CUSTOMER); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | // データ行の出力. |
187 | 187 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
188 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
188 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
189 | 189 | |
190 | 190 | $Csvs = $csvService->getCsvs(); |
191 | 191 | |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | }); |
208 | 208 | |
209 | 209 | $now = new \DateTime(); |
210 | - $filename = 'customer_' . $now->format('YmdHis') . '.csv'; |
|
210 | + $filename = 'customer_'.$now->format('YmdHis').'.csv'; |
|
211 | 211 | $response->headers->set('Content-Type', 'application/octet-stream'); |
212 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
212 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
213 | 213 | $response->send(); |
214 | 214 | |
215 | 215 | return $response; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | foreach ($images as $img) { |
152 | 152 | foreach ($img as $image) { |
153 | 153 | $extension = $image->getClientOriginalExtension(); |
154 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
154 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
155 | 155 | $image->move($app['config']['image_temp_realdir'], $filename); |
156 | 156 | $files[] = $filename; |
157 | 157 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $app['orm.em']->persist($ProductImage); |
306 | 306 | |
307 | 307 | // 移動 |
308 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
308 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
309 | 309 | $file->move($app['config']['image_save_realdir']); |
310 | 310 | } |
311 | 311 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | // 削除 |
327 | 327 | $fs = new Filesystem(); |
328 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
328 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
329 | 329 | } |
330 | 330 | $app['orm.em']->persist($Product); |
331 | 331 | $app['orm.em']->flush(); |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | foreach ($deleteImages as $deleteImage) { |
425 | 425 | try { |
426 | 426 | $fs = new Filesystem(); |
427 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
427 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
428 | 428 | } catch (\Exception $e) { |
429 | 429 | // エラーが発生しても無視する |
430 | 430 | } |
@@ -488,10 +488,10 @@ discard block |
||
488 | 488 | |
489 | 489 | // 画像ファイルを新規作成 |
490 | 490 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
491 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
491 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
492 | 492 | try { |
493 | 493 | $fs = new Filesystem(); |
494 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
494 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
495 | 495 | } catch (\Exception $e) { |
496 | 496 | // エラーが発生しても無視する |
497 | 497 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $em->getConfiguration()->setSQLLogger(null); |
547 | 547 | |
548 | 548 | $response = new StreamedResponse(); |
549 | - $response->setCallback(function () use ($app, $request, $em) { |
|
549 | + $response->setCallback(function() use ($app, $request, $em) { |
|
550 | 550 | |
551 | 551 | // CSV種別を元に初期化. |
552 | 552 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | |
571 | 571 | // データ行の出力. |
572 | 572 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
573 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
573 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
574 | 574 | |
575 | 575 | $Csvs = $csvService->getCsvs(); |
576 | 576 | |
@@ -602,9 +602,9 @@ discard block |
||
602 | 602 | }); |
603 | 603 | |
604 | 604 | $now = new \DateTime(); |
605 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
605 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
606 | 606 | $response->headers->set('Content-Type', 'application/octet-stream'); |
607 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
607 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
608 | 608 | $response->send(); |
609 | 609 | |
610 | 610 | return $response; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $em->getConfiguration()->setSQLLogger(null); |
185 | 185 | |
186 | 186 | $response = new StreamedResponse(); |
187 | - $response->setCallback(function () use ($app, $request, $em) { |
|
187 | + $response->setCallback(function() use ($app, $request, $em) { |
|
188 | 188 | |
189 | 189 | // CSV種別を元に初期化. |
190 | 190 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_ORDER); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | // データ行の出力. |
200 | 200 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
201 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
201 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
202 | 202 | |
203 | 203 | $Csvs = $csvService->getCsvs(); |
204 | 204 | |
@@ -228,9 +228,9 @@ discard block |
||
228 | 228 | }); |
229 | 229 | |
230 | 230 | $now = new \DateTime(); |
231 | - $filename = 'order_' . $now->format('YmdHis') . '.csv'; |
|
231 | + $filename = 'order_'.$now->format('YmdHis').'.csv'; |
|
232 | 232 | $response->headers->set('Content-Type', 'application/octet-stream'); |
233 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
233 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
234 | 234 | $response->send(); |
235 | 235 | |
236 | 236 | return $response; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $em->getConfiguration()->setSQLLogger(null); |
254 | 254 | |
255 | 255 | $response = new StreamedResponse(); |
256 | - $response->setCallback(function () use ($app, $request, $em) { |
|
256 | + $response->setCallback(function() use ($app, $request, $em) { |
|
257 | 257 | |
258 | 258 | // CSV種別を元に初期化. |
259 | 259 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_SHIPPING); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | // データ行の出力. |
269 | 269 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
270 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
270 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
271 | 271 | |
272 | 272 | $Csvs = $csvService->getCsvs(); |
273 | 273 | |
@@ -305,9 +305,9 @@ discard block |
||
305 | 305 | }); |
306 | 306 | |
307 | 307 | $now = new \DateTime(); |
308 | - $filename = 'shipping_' . $now->format('YmdHis') . '.csv'; |
|
308 | + $filename = 'shipping_'.$now->format('YmdHis').'.csv'; |
|
309 | 309 | $response->headers->set('Content-Type', 'application/octet-stream'); |
310 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
310 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
311 | 311 | $response->send(); |
312 | 312 | |
313 | 313 | return $response; |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | { |
308 | 308 | $config = $this->config; |
309 | 309 | |
310 | - return function ($value) use ($config) { |
|
310 | + return function($value) use ($config) { |
|
311 | 311 | return mb_convert_encoding( |
312 | 312 | (string) $value, $config['csv_export_encoding'], 'UTF-8' |
313 | 313 | ); |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | if ($Conditions instanceof ArrayCollection) { |
432 | 432 | $Conditions = new ArrayCollection( |
433 | 433 | array_map( |
434 | - function ($Entity) use ($em) { |
|
434 | + function($Entity) use ($em) { |
|
435 | 435 | return $em->getRepository(get_class($Entity))->find($Entity->getId()); |
436 | 436 | }, $Conditions->toArray() |
437 | 437 | ) |