@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $em->getConfiguration()->setSQLLogger(null); |
| 236 | 236 | |
| 237 | 237 | $response = new StreamedResponse(); |
| 238 | - $response->setCallback(function () use ($app, $request) { |
|
| 238 | + $response->setCallback(function() use ($app, $request) { |
|
| 239 | 239 | |
| 240 | 240 | // CSV種別を元に初期化. |
| 241 | 241 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CUSTOMER); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | // データ行の出力. |
| 251 | 251 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 252 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 252 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 253 | 253 | |
| 254 | 254 | $Csvs = $csvService->getCsvs(); |
| 255 | 255 | |
@@ -284,9 +284,9 @@ discard block |
||
| 284 | 284 | }); |
| 285 | 285 | |
| 286 | 286 | $now = new \DateTime(); |
| 287 | - $filename = 'customer_' . $now->format('YmdHis') . '.csv'; |
|
| 287 | + $filename = 'customer_'.$now->format('YmdHis').'.csv'; |
|
| 288 | 288 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 289 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 289 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 290 | 290 | |
| 291 | 291 | $response->send(); |
| 292 | 292 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $em->getConfiguration()->setSQLLogger(null); |
| 241 | 241 | |
| 242 | 242 | $response = new StreamedResponse(); |
| 243 | - $response->setCallback(function () use ($app, $request) { |
|
| 243 | + $response->setCallback(function() use ($app, $request) { |
|
| 244 | 244 | |
| 245 | 245 | // CSV種別を元に初期化. |
| 246 | 246 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_ORDER); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | // データ行の出力. |
| 256 | 256 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 257 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 257 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 258 | 258 | |
| 259 | 259 | $Csvs = $csvService->getCsvs(); |
| 260 | 260 | |
@@ -295,9 +295,9 @@ discard block |
||
| 295 | 295 | }); |
| 296 | 296 | |
| 297 | 297 | $now = new \DateTime(); |
| 298 | - $filename = 'order_' . $now->format('YmdHis') . '.csv'; |
|
| 298 | + $filename = 'order_'.$now->format('YmdHis').'.csv'; |
|
| 299 | 299 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 300 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 300 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 301 | 301 | $response->send(); |
| 302 | 302 | |
| 303 | 303 | log_info('受注CSV出力ファイル名', array($filename)); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | $em->getConfiguration()->setSQLLogger(null); |
| 323 | 323 | |
| 324 | 324 | $response = new StreamedResponse(); |
| 325 | - $response->setCallback(function () use ($app, $request) { |
|
| 325 | + $response->setCallback(function() use ($app, $request) { |
|
| 326 | 326 | |
| 327 | 327 | // CSV種別を元に初期化. |
| 328 | 328 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_SHIPPING); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | // データ行の出力. |
| 338 | 338 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 339 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 339 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 340 | 340 | |
| 341 | 341 | $Csvs = $csvService->getCsvs(); |
| 342 | 342 | |
@@ -386,9 +386,9 @@ discard block |
||
| 386 | 386 | }); |
| 387 | 387 | |
| 388 | 388 | $now = new \DateTime(); |
| 389 | - $filename = 'shipping_' . $now->format('YmdHis') . '.csv'; |
|
| 389 | + $filename = 'shipping_'.$now->format('YmdHis').'.csv'; |
|
| 390 | 390 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 391 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 391 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 392 | 392 | $response->send(); |
| 393 | 393 | |
| 394 | 394 | log_info('配送CSV出力ファイル名', array($filename)); |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | $em->getConfiguration()->setSQLLogger(null); |
| 206 | 206 | |
| 207 | 207 | $response = new StreamedResponse(); |
| 208 | - $response->setCallback(function () use ($app, $request) { |
|
| 208 | + $response->setCallback(function() use ($app, $request) { |
|
| 209 | 209 | |
| 210 | 210 | // CSV種別を元に初期化. |
| 211 | 211 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CATEGORY); |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | // データ行の出力. |
| 221 | 221 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 222 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 222 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 223 | 223 | |
| 224 | 224 | $Csvs = $csvService->getCsvs(); |
| 225 | 225 | |
@@ -252,9 +252,9 @@ discard block |
||
| 252 | 252 | }); |
| 253 | 253 | |
| 254 | 254 | $now = new \DateTime(); |
| 255 | - $filename = 'category_' . $now->format('YmdHis') . '.csv'; |
|
| 255 | + $filename = 'category_'.$now->format('YmdHis').'.csv'; |
|
| 256 | 256 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 257 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 257 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 258 | 258 | $response->send(); |
| 259 | 259 | |
| 260 | 260 | log_info('カテゴリCSV出力ファイル名', array($filename)); |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | $extension = $image->getClientOriginalExtension(); |
| 205 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 205 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 206 | 206 | $image->move($app['config']['image_temp_realdir'], $filename); |
| 207 | 207 | $files[] = $filename; |
| 208 | 208 | } |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $form = $builder->getForm(); |
| 279 | 279 | |
| 280 | 280 | if (!$has_class) { |
| 281 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
| 281 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
| 282 | 282 | $form['class']->setData($ProductClass); |
| 283 | 283 | } |
| 284 | 284 | |
@@ -364,8 +364,8 @@ discard block |
||
| 364 | 364 | $Categories = $form->get('Category')->getData(); |
| 365 | 365 | $categoriesIdList = array(); |
| 366 | 366 | foreach ($Categories as $Category) { |
| 367 | - foreach($Category->getPath() as $ParentCategory){ |
|
| 368 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
| 367 | + foreach ($Category->getPath() as $ParentCategory) { |
|
| 368 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
| 369 | 369 | $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); |
| 370 | 370 | $app['orm.em']->persist($ProductCategory); |
| 371 | 371 | $count++; |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | $categoriesIdList[$ParentCategory->getId()] = true; |
| 375 | 375 | } |
| 376 | 376 | } |
| 377 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
| 377 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
| 378 | 378 | $ProductCategory = $this->createProductCategory($Product, $Category, $count); |
| 379 | 379 | $app['orm.em']->persist($ProductCategory); |
| 380 | 380 | $count++; |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $app['orm.em']->persist($ProductImage); |
| 397 | 397 | |
| 398 | 398 | // 移動 |
| 399 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); |
|
| 399 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); |
|
| 400 | 400 | $file->move($app['config']['image_save_realdir']); |
| 401 | 401 | } |
| 402 | 402 | |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | |
| 417 | 417 | // 削除 |
| 418 | 418 | $fs = new Filesystem(); |
| 419 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); |
|
| 419 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); |
|
| 420 | 420 | } |
| 421 | 421 | $app['orm.em']->persist($Product); |
| 422 | 422 | $app['orm.em']->flush(); |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | foreach ($deleteImages as $deleteImage) { |
| 577 | 577 | try { |
| 578 | 578 | $fs = new Filesystem(); |
| 579 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); |
|
| 579 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); |
|
| 580 | 580 | } catch (\Exception $e) { |
| 581 | 581 | // エラーが発生しても無視する |
| 582 | 582 | } |
@@ -646,10 +646,10 @@ discard block |
||
| 646 | 646 | |
| 647 | 647 | // 画像ファイルを新規作成 |
| 648 | 648 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
| 649 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
| 649 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
| 650 | 650 | try { |
| 651 | 651 | $fs = new Filesystem(); |
| 652 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); |
|
| 652 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); |
|
| 653 | 653 | } catch (\Exception $e) { |
| 654 | 654 | // エラーが発生しても無視する |
| 655 | 655 | } |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $em->getConfiguration()->setSQLLogger(null); |
| 725 | 725 | |
| 726 | 726 | $response = new StreamedResponse(); |
| 727 | - $response->setCallback(function () use ($app, $request) { |
|
| 727 | + $response->setCallback(function() use ($app, $request) { |
|
| 728 | 728 | |
| 729 | 729 | // CSV種別を元に初期化. |
| 730 | 730 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | |
| 749 | 749 | // データ行の出力. |
| 750 | 750 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
| 751 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 751 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) use ($app, $request) { |
|
| 752 | 752 | |
| 753 | 753 | $Csvs = $csvService->getCsvs(); |
| 754 | 754 | |
@@ -792,9 +792,9 @@ discard block |
||
| 792 | 792 | }); |
| 793 | 793 | |
| 794 | 794 | $now = new \DateTime(); |
| 795 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
| 795 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
| 796 | 796 | $response->headers->set('Content-Type', 'application/octet-stream'); |
| 797 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
| 797 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
| 798 | 798 | $response->send(); |
| 799 | 799 | |
| 800 | 800 | log_info('商品CSV出力ファイル名', array($filename)); |