@@ -67,8 +67,8 @@ |
||
67 | 67 | 'constraints' => array( |
68 | 68 | new Assert\NotBlank(array('message' => 'ファイルを選択してください。')), |
69 | 69 | new Assert\File(array( |
70 | - 'maxSize' => $this->appConfig['csv_size'] . 'M', |
|
71 | - 'maxSizeMessage' => 'CSVファイルは' . $this->appConfig['csv_size'] . 'M以下でアップロードしてください。', |
|
70 | + 'maxSize' => $this->appConfig['csv_size'].'M', |
|
71 | + 'maxSizeMessage' => 'CSVファイルは'.$this->appConfig['csv_size'].'M以下でアップロードしてください。', |
|
72 | 72 | )), |
73 | 73 | ), |
74 | 74 | )); |
@@ -166,19 +166,19 @@ |
||
166 | 166 | 'help' => 'メーラーバックエンドがSMTPかつSMTP-AUTH使用時のみ指定', |
167 | 167 | 'required' => false, |
168 | 168 | )) |
169 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
169 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
170 | 170 | $form = $event->getForm(); |
171 | 171 | $data = $form->getData(); |
172 | 172 | |
173 | 173 | $ips = preg_split("/\R/", $data['admin_allow_hosts'], null, PREG_SPLIT_NO_EMPTY); |
174 | 174 | |
175 | - foreach($ips as $ip) { |
|
175 | + foreach ($ips as $ip) { |
|
176 | 176 | $errors = $this->validator->validate($ip, array( |
177 | 177 | new Assert\Ip(), |
178 | 178 | ) |
179 | 179 | ); |
180 | 180 | if ($errors->count() != 0) { |
181 | - $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
181 | + $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | }) |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'label' => 'パスワード', |
107 | 107 | 'required' => false, |
108 | 108 | )) |
109 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
109 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
110 | 110 | $form = $event->getForm(); |
111 | 111 | $data = $form->getData(); |
112 | 112 | try { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
132 | 132 | $conn->connect(); |
133 | 133 | } catch (\Exception $e) { |
134 | - $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage())); |
|
134 | + $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage())); |
|
135 | 135 | } |
136 | 136 | }); |
137 | 137 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public function validate($data, ExecutionContext $context, $param = null) |
148 | 148 | { |
149 | 149 | $parameters = $this->requestStack->getCurrentRequest()->get('install_step4'); |
150 | - if ($parameters['database'] != 'pdo_sqlite'){ |
|
150 | + if ($parameters['database'] != 'pdo_sqlite') { |
|
151 | 151 | $context->getValidator()->validate($data, array( |
152 | 152 | new Assert\NotBlank() |
153 | 153 | )); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | use Eccube\Annotation\FormType; |
28 | 28 | use \Symfony\Component\Form\AbstractType; |
29 | -use \Symfony\Component\Form\Extension\Core\Type\CheckboxType;; |
|
29 | +use \Symfony\Component\Form\Extension\Core\Type\CheckboxType; ; |
|
30 | 30 | use \Symfony\Component\Form\FormBuilderInterface; |
31 | 31 | |
32 | 32 | /** |
@@ -1117,7 +1117,7 @@ |
||
1117 | 1117 | |
1118 | 1118 | // 配送日数が設定されている |
1119 | 1119 | if ($deliveryDateFlag) { |
1120 | - $period = new \DatePeriod ( |
|
1120 | + $period = new \DatePeriod( |
|
1121 | 1121 | new \DateTime($minDate.' day'), |
1122 | 1122 | new \DateInterval('P1D'), |
1123 | 1123 | new \DateTime($minDate + $this->appConfig['deliv_date_end_max'].' day') |
@@ -197,7 +197,7 @@ |
||
197 | 197 | $this->appConfig['block_default_realdir'], |
198 | 198 | ); |
199 | 199 | foreach ($readPaths as $readPath) { |
200 | - $filePath = $readPath . '/' . $fileName . '.twig'; |
|
200 | + $filePath = $readPath.'/'.$fileName.'.twig'; |
|
201 | 201 | $fs = new Filesystem(); |
202 | 202 | if ($fs->exists($filePath)) { |
203 | 203 | return array( |
@@ -20,34 +20,34 @@ |
||
20 | 20 | |
21 | 21 | public function register(Container $app) |
22 | 22 | { |
23 | - $app['eccube.service.cart'] = function () use ($app) { |
|
23 | + $app['eccube.service.cart'] = function() use ($app) { |
|
24 | 24 | return $app[CartService::class]; |
25 | 25 | }; |
26 | - $app['eccube.service.order'] = function () use ($app) { |
|
26 | + $app['eccube.service.order'] = function() use ($app) { |
|
27 | 27 | return $app[OrderService::class]; |
28 | 28 | }; |
29 | - $app['eccube.service.tax_rule'] = function () use ($app) { |
|
29 | + $app['eccube.service.tax_rule'] = function() use ($app) { |
|
30 | 30 | return $app[TaxRuleService::class]; |
31 | 31 | }; |
32 | - $app['eccube.service.plugin'] = function () use ($app) { |
|
32 | + $app['eccube.service.plugin'] = function() use ($app) { |
|
33 | 33 | return $app[PluginService::class]; |
34 | 34 | }; |
35 | - $app['eccube.service.mail'] = function () use ($app) { |
|
35 | + $app['eccube.service.mail'] = function() use ($app) { |
|
36 | 36 | return $app[MailService::class]; |
37 | 37 | }; |
38 | - $app['eccube.helper.order'] = function ($app) { |
|
38 | + $app['eccube.helper.order'] = function($app) { |
|
39 | 39 | return $app[OrderHelper::class]; |
40 | 40 | }; |
41 | - $app['eccube.service.csv.export'] = function () use ($app) { |
|
41 | + $app['eccube.service.csv.export'] = function() use ($app) { |
|
42 | 42 | return $app[CsvExportService::class]; |
43 | 43 | }; |
44 | - $app['eccube.service.shopping'] = function () use ($app) { |
|
44 | + $app['eccube.service.shopping'] = function() use ($app) { |
|
45 | 45 | return $app[ShoppingService::class]; |
46 | 46 | }; |
47 | - $app['eccube.service.payment'] = function () use ($app) { |
|
47 | + $app['eccube.service.payment'] = function() use ($app) { |
|
48 | 48 | return $app[PaymentService::class]; |
49 | 49 | }; |
50 | - $app['eccube.service.system'] = function () use ($app) { |
|
50 | + $app['eccube.service.system'] = function() use ($app) { |
|
51 | 51 | return $app[SystemService::class]; |
52 | 52 | }; |
53 | 53 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | ); |
24 | 24 | } |
25 | 25 | |
26 | - $app[TwigLintValidator::class] = function (Container $app) { |
|
26 | + $app[TwigLintValidator::class] = function(Container $app) { |
|
27 | 27 | return new TwigLintValidator($app['twig']); |
28 | 28 | }; |
29 | 29 |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | |
322 | 322 | $extension = $image->getClientOriginalExtension(); |
323 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
323 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
324 | 324 | $image->move($this->appConfig['image_temp_realdir'], $filename); |
325 | 325 | $files[] = $filename; |
326 | 326 | } |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $form = $builder->getForm(); |
400 | 400 | |
401 | 401 | if (!$has_class) { |
402 | - $ProductClass->setStockUnlimited((boolean)$ProductClass->getStockUnlimited()); |
|
402 | + $ProductClass->setStockUnlimited((boolean) $ProductClass->getStockUnlimited()); |
|
403 | 403 | $form['class']->setData($ProductClass); |
404 | 404 | } |
405 | 405 | |
@@ -481,8 +481,8 @@ discard block |
||
481 | 481 | $Categories = $form->get('Category')->getData(); |
482 | 482 | $categoriesIdList = array(); |
483 | 483 | foreach ($Categories as $Category) { |
484 | - foreach($Category->getPath() as $ParentCategory){ |
|
485 | - if (!isset($categoriesIdList[$ParentCategory->getId()])){ |
|
484 | + foreach ($Category->getPath() as $ParentCategory) { |
|
485 | + if (!isset($categoriesIdList[$ParentCategory->getId()])) { |
|
486 | 486 | $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count); |
487 | 487 | $this->entityManager->persist($ProductCategory); |
488 | 488 | $count++; |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | $categoriesIdList[$ParentCategory->getId()] = true; |
492 | 492 | } |
493 | 493 | } |
494 | - if (!isset($categoriesIdList[$Category->getId()])){ |
|
494 | + if (!isset($categoriesIdList[$Category->getId()])) { |
|
495 | 495 | $ProductCategory = $this->createProductCategory($Product, $Category, $count); |
496 | 496 | $this->entityManager->persist($ProductCategory); |
497 | 497 | $count++; |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | $this->entityManager->persist($ProductImage); |
514 | 514 | |
515 | 515 | // 移動 |
516 | - $file = new File($this->appConfig['image_temp_realdir'] . '/' . $add_image); |
|
516 | + $file = new File($this->appConfig['image_temp_realdir'].'/'.$add_image); |
|
517 | 517 | $file->move($this->appConfig['image_save_realdir']); |
518 | 518 | } |
519 | 519 | |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | |
534 | 534 | // 削除 |
535 | 535 | $fs = new Filesystem(); |
536 | - $fs->remove($this->appConfig['image_save_realdir'] . '/' . $delete_image); |
|
536 | + $fs->remove($this->appConfig['image_save_realdir'].'/'.$delete_image); |
|
537 | 537 | } |
538 | 538 | $this->entityManager->persist($Product); |
539 | 539 | $this->entityManager->flush(); |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | foreach ($deleteImages as $deleteImage) { |
669 | 669 | try { |
670 | 670 | $fs = new Filesystem(); |
671 | - $fs->remove($this->appConfig['image_save_realdir'] . '/' . $deleteImage); |
|
671 | + $fs->remove($this->appConfig['image_save_realdir'].'/'.$deleteImage); |
|
672 | 672 | } catch (\Exception $e) { |
673 | 673 | // エラーが発生しても無視する |
674 | 674 | } |
@@ -742,10 +742,10 @@ discard block |
||
742 | 742 | |
743 | 743 | // 画像ファイルを新規作成 |
744 | 744 | $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION); |
745 | - $filename = date('mdHis') . uniqid('_') . '.' . $extension; |
|
745 | + $filename = date('mdHis').uniqid('_').'.'.$extension; |
|
746 | 746 | try { |
747 | 747 | $fs = new Filesystem(); |
748 | - $fs->copy($this->appConfig['image_save_realdir'] . '/' . $Image->getFileName(), $this->appConfig['image_save_realdir'] . '/' . $filename); |
|
748 | + $fs->copy($this->appConfig['image_save_realdir'].'/'.$Image->getFileName(), $this->appConfig['image_save_realdir'].'/'.$filename); |
|
749 | 749 | } catch (\Exception $e) { |
750 | 750 | // エラーが発生しても無視する |
751 | 751 | } |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | $em->getConfiguration()->setSQLLogger(null); |
826 | 826 | |
827 | 827 | $response = new StreamedResponse(); |
828 | - $response->setCallback(function () use ($app, $request) { |
|
828 | + $response->setCallback(function() use ($app, $request) { |
|
829 | 829 | |
830 | 830 | // CSV種別を元に初期化. |
831 | 831 | $this->csvExportService->initCsvType(CsvType::CSV_TYPE_PRODUCT); |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | // データ行の出力. |
866 | 866 | $this->csvExportService->setExportQueryBuilder($qb); |
867 | 867 | |
868 | - $this->csvExportService->exportData(function ($entity, CsvExportService $csvService) use ($app, $request) { |
|
868 | + $this->csvExportService->exportData(function($entity, CsvExportService $csvService) use ($app, $request) { |
|
869 | 869 | $Csvs = $csvService->getCsvs(); |
870 | 870 | |
871 | 871 | /** @var $Product \Eccube\Entity\Product */ |
@@ -908,9 +908,9 @@ discard block |
||
908 | 908 | }); |
909 | 909 | |
910 | 910 | $now = new \DateTime(); |
911 | - $filename = 'product_' . $now->format('YmdHis') . '.csv'; |
|
911 | + $filename = 'product_'.$now->format('YmdHis').'.csv'; |
|
912 | 912 | $response->headers->set('Content-Type', 'application/octet-stream'); |
913 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
913 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
914 | 914 | $response->send(); |
915 | 915 | |
916 | 916 | log_info('商品CSV出力ファイル名', array($filename)); |