| @@ -203,7 +203,7 @@ discard block | ||
| 203 | 203 | } | 
| 204 | 204 | |
| 205 | 205 | $extension = $image->getClientOriginalExtension(); | 
| 206 | -                    $filename = date('mdHis') . uniqid('_') . '.' . $extension; | |
| 206 | +                    $filename = date('mdHis').uniqid('_').'.'.$extension; | |
| 207 | 207 | $image->move($app['config']['image_temp_realdir'], $filename); | 
| 208 | 208 | $files[] = $filename; | 
| 209 | 209 | } | 
| @@ -279,7 +279,7 @@ discard block | ||
| 279 | 279 | $form = $builder->getForm(); | 
| 280 | 280 | |
| 281 | 281 |          if (!$has_class) { | 
| 282 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); | |
| 282 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); | |
| 283 | 283 | $form['class']->setData($ProductClass); | 
| 284 | 284 | } | 
| 285 | 285 | |
| @@ -365,8 +365,8 @@ discard block | ||
| 365 | 365 |                  $Categories = $form->get('Category')->getData(); | 
| 366 | 366 | $categoriesIdList = array(); | 
| 367 | 367 |                  foreach ($Categories as $Category) { | 
| 368 | -                    foreach($Category->getPath() as $ParentCategory){ | |
| 369 | -                        if (!isset($categoriesIdList[$ParentCategory->getId()])){ | |
| 368 | +                    foreach ($Category->getPath() as $ParentCategory) { | |
| 369 | +                        if (!isset($categoriesIdList[$ParentCategory->getId()])) { | |
| 370 | 370 | $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); | 
| 371 | 371 | $app['orm.em']->persist($ProductCategory); | 
| 372 | 372 | $count++; | 
| @@ -375,7 +375,7 @@ discard block | ||
| 375 | 375 | $categoriesIdList[$ParentCategory->getId()] = true; | 
| 376 | 376 | } | 
| 377 | 377 | } | 
| 378 | -                    if (!isset($categoriesIdList[$Category->getId()])){ | |
| 378 | +                    if (!isset($categoriesIdList[$Category->getId()])) { | |
| 379 | 379 | $ProductCategory = $this->createProductCategory($Product, $Category, $count); | 
| 380 | 380 | $app['orm.em']->persist($ProductCategory); | 
| 381 | 381 | $count++; | 
| @@ -397,7 +397,7 @@ discard block | ||
| 397 | 397 | $app['orm.em']->persist($ProductImage); | 
| 398 | 398 | |
| 399 | 399 | // 移動 | 
| 400 | - $file = new File($app['config']['image_temp_realdir'] . '/' . $add_image); | |
| 400 | + $file = new File($app['config']['image_temp_realdir'].'/'.$add_image); | |
| 401 | 401 | $file->move($app['config']['image_save_realdir']); | 
| 402 | 402 | } | 
| 403 | 403 | |
| @@ -417,7 +417,7 @@ discard block | ||
| 417 | 417 | |
| 418 | 418 | // 削除 | 
| 419 | 419 | $fs = new Filesystem(); | 
| 420 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $delete_image); | |
| 420 | + $fs->remove($app['config']['image_save_realdir'].'/'.$delete_image); | |
| 421 | 421 | } | 
| 422 | 422 | $app['orm.em']->persist($Product); | 
| 423 | 423 | $app['orm.em']->flush(); | 
| @@ -577,7 +577,7 @@ discard block | ||
| 577 | 577 |                  foreach ($deleteImages as $deleteImage) { | 
| 578 | 578 |                      try { | 
| 579 | 579 | $fs = new Filesystem(); | 
| 580 | - $fs->remove($app['config']['image_save_realdir'] . '/' . $deleteImage); | |
| 580 | + $fs->remove($app['config']['image_save_realdir'].'/'.$deleteImage); | |
| 581 | 581 |                      } catch (\Exception $e) { | 
| 582 | 582 | // エラーが発生しても無視する | 
| 583 | 583 | } | 
| @@ -647,10 +647,10 @@ discard block | ||
| 647 | 647 | |
| 648 | 648 | // 画像ファイルを新規作成 | 
| 649 | 649 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); | 
| 650 | -                    $filename = date('mdHis') . uniqid('_') . '.' . $extension; | |
| 650 | +                    $filename = date('mdHis').uniqid('_').'.'.$extension; | |
| 651 | 651 |                      try { | 
| 652 | 652 | $fs = new Filesystem(); | 
| 653 | - $fs->copy($app['config']['image_save_realdir'] . '/' . $Image->getFileName(), $app['config']['image_save_realdir'] . '/' . $filename); | |
| 653 | + $fs->copy($app['config']['image_save_realdir'].'/'.$Image->getFileName(), $app['config']['image_save_realdir'].'/'.$filename); | |
| 654 | 654 |                      } catch (\Exception $e) { | 
| 655 | 655 | // エラーが発生しても無視する | 
| 656 | 656 | } | 
| @@ -725,7 +725,7 @@ discard block | ||
| 725 | 725 | $em->getConfiguration()->setSQLLogger(null); | 
| 726 | 726 | |
| 727 | 727 | $response = new StreamedResponse(); | 
| 728 | -        $response->setCallback(function () use ($app, $request) { | |
| 728 | +        $response->setCallback(function() use ($app, $request) { | |
| 729 | 729 | |
| 730 | 730 | // CSV種別を元に初期化. | 
| 731 | 731 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_PRODUCT); | 
| @@ -765,7 +765,7 @@ discard block | ||
| 765 | 765 | // データ行の出力. | 
| 766 | 766 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); | 
| 767 | 767 | |
| 768 | -            $app['eccube.service.csv.export']->exportData(function ($entity, CsvExportService $csvService) use ($app, $request) { | |
| 768 | +            $app['eccube.service.csv.export']->exportData(function($entity, CsvExportService $csvService) use ($app, $request) { | |
| 769 | 769 | $Csvs = $csvService->getCsvs(); | 
| 770 | 770 | |
| 771 | 771 | /** @var $Product \Eccube\Entity\Product */ | 
| @@ -808,9 +808,9 @@ discard block | ||
| 808 | 808 | }); | 
| 809 | 809 | |
| 810 | 810 | $now = new \DateTime(); | 
| 811 | -        $filename = 'product_' . $now->format('YmdHis') . '.csv'; | |
| 811 | +        $filename = 'product_'.$now->format('YmdHis').'.csv'; | |
| 812 | 812 |          $response->headers->set('Content-Type', 'application/octet-stream'); | 
| 813 | -        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); | |
| 813 | +        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); | |
| 814 | 814 | $response->send(); | 
| 815 | 815 | |
| 816 | 816 |          log_info('商品CSV出力ファイル名', array($filename)); |