Completed
Pull Request — experimental/3.1 (#2561)
by k-yamamura
30:51
created
src/Eccube/Resource/config/path.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php return [
2 2
   'root_dir' => '%ROOT_DIR%',
3 3
   'root_urlpath' => env('ECCUBE_ROOT_URLPATH', null),
4
-  'template_code' => env('ECCUBE_TEMPLATE_CODE','default'),
5
-  'admin_route' => env('ECCUBE_ADMIN_ROUTE','admin'),
4
+  'template_code' => env('ECCUBE_TEMPLATE_CODE', 'default'),
5
+  'admin_route' => env('ECCUBE_ADMIN_ROUTE', 'admin'),
6 6
   'user_data_route' => env('ECCUBE_USER_DATA_ROUTE', 'user_data'),
7 7
   'public_path' => env('ECCUBE_ROOT_URLPATH', null).'/html',
8 8
   'public_path_realdir' => '%ROOT_DIR%/html',
Please login to merge, or discard this patch.
src/Eccube/Doctrine/Common/CsvDataFixtures/CsvFixture.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         }
35 35
 
36 36
         // CSV Reader に設定
37
-        $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY |\SplFileObject::DROP_NEW_LINE);
37
+        $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY|\SplFileObject::DROP_NEW_LINE);
38 38
 
39 39
         // ヘッダ行を取得
40 40
         $headers = $this->file->current();
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/CsvImportController.php 1 patch
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                     foreach ($data as $row) {
189 189
 
190 190
                         if ($headerSize != count($row)) {
191
-                            $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。');
191
+                            $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。');
192 192
                             return $this->render($app, $form, $headers);
193 193
                         }
194 194
 
@@ -199,33 +199,33 @@  discard block
 block discarded – undo
199 199
                             if (preg_match('/^\d+$/', $row['商品ID'])) {
200 200
                                 $Product = $this->productRepository->find($row['商品ID']);
201 201
                                 if (!$Product) {
202
-                                    $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。');
202
+                                    $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。');
203 203
                                     return $this->render($app, $form, $headers);
204 204
                                 }
205 205
                             } else {
206
-                                $this->addErrors(($data->key() + 1) . '行目の商品IDが存在しません。');
206
+                                $this->addErrors(($data->key() + 1).'行目の商品IDが存在しません。');
207 207
                                 return $this->render($app, $form, $headers);
208 208
                             }
209 209
 
210 210
                         }
211 211
 
212 212
                         if ($row['公開ステータス(ID)'] == '') {
213
-                            $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が設定されていません。');
213
+                            $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が設定されていません。');
214 214
                         } else {
215 215
                             if (preg_match('/^\d+$/', $row['公開ステータス(ID)'])) {
216 216
                                 $ProductStatus = $this->productStatusRepository->find($row['公開ステータス(ID)']);
217 217
                                 if (!$ProductStatus) {
218
-                                    $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。');
218
+                                    $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。');
219 219
                                 } else {
220 220
                                     $Product->setStatus($ProductStatus);
221 221
                                 }
222 222
                             } else {
223
-                                $this->addErrors(($data->key() + 1) . '行目の公開ステータス(ID)が存在しません。');
223
+                                $this->addErrors(($data->key() + 1).'行目の公開ステータス(ID)が存在しません。');
224 224
                             }
225 225
                         }
226 226
 
227 227
                         if (Str::isBlank($row['商品名'])) {
228
-                            $this->addErrors(($data->key() + 1) . '行目の商品名が設定されていません。');
228
+                            $this->addErrors(($data->key() + 1).'行目の商品名が設定されていません。');
229 229
                             return $this->render($app, $form, $headers);
230 230
                         } else {
231 231
                             $Product->setName(Str::trimAll($row['商品名']));
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                                     if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) {
285 285
                                         $ProductClassOrg->setDeliveryFee($deliveryFee);
286 286
                                     } else {
287
-                                        $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。');
287
+                                        $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。');
288 288
                                     }
289 289
                                 }
290 290
                             }
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                             if ($row['規格分類1(ID)'] != '') {
293 293
 
294 294
                                 if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) {
295
-                                    $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。');
295
+                                    $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。');
296 296
                                 } else {
297 297
                                     // 商品規格あり
298 298
                                     // 企画分類あり商品を作成
@@ -307,30 +307,30 @@  discard block
 block discarded – undo
307 307
                                     if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) {
308 308
                                         $ClassCategory1 = $this->classCategoryRepository->find($row['規格分類1(ID)']);
309 309
                                         if (!$ClassCategory1) {
310
-                                            $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
310
+                                            $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
311 311
                                         } else {
312 312
                                             $ProductClass->setClassCategory1($ClassCategory1);
313 313
                                         }
314 314
                                     } else {
315
-                                        $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
315
+                                        $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
316 316
                                     }
317 317
 
318 318
                                     if ($row['規格分類2(ID)'] != '') {
319 319
                                         if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) {
320 320
                                             $ClassCategory2 = $this->classCategoryRepository->find($row['規格分類2(ID)']);
321 321
                                             if (!$ClassCategory2) {
322
-                                                $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
322
+                                                $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
323 323
                                             } else {
324 324
                                                 if ($ClassCategory1 &&
325 325
                                                     ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId())
326 326
                                                 ) {
327
-                                                    $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。');
327
+                                                    $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。');
328 328
                                                 } else {
329 329
                                                     $ProductClass->setClassCategory2($ClassCategory2);
330 330
                                                 }
331 331
                                             }
332 332
                                         } else {
333
-                                            $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
333
+                                            $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
334 334
                                         }
335 335
                                     }
336 336
                                     $ProductClass->setProductStock($ProductStock);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
                             } else {
344 344
                                 if ($row['規格分類2(ID)'] != '') {
345
-                                    $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
345
+                                    $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
346 346
                                 }
347 347
                             }
348 348
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                                             if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) {
371 371
                                                 $pc->setDeliveryFee($deliveryFee);
372 372
                                             } else {
373
-                                                $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。');
373
+                                                $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。');
374 374
                                             }
375 375
                                         }
376 376
                                     }
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
                                 }
393 393
 
394 394
                                 if ($row['規格分類1(ID)'] == $row['規格分類2(ID)']) {
395
-                                    $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。');
395
+                                    $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)には同じ値を使用できません。');
396 396
                                 } else {
397 397
 
398 398
                                     // 必ず規格分類1がセットされている
@@ -401,36 +401,36 @@  discard block
 block discarded – undo
401 401
                                     if (preg_match('/^\d+$/', $classCategoryId1)) {
402 402
                                         $ClassCategory1 = $this->classCategoryRepository->find($classCategoryId1);
403 403
                                         if (!$ClassCategory1) {
404
-                                            $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
404
+                                            $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
405 405
                                         }
406 406
                                     } else {
407
-                                        $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
407
+                                        $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
408 408
                                     }
409 409
 
410 410
                                     $ClassCategory2 = null;
411 411
                                     if ($row['規格分類2(ID)'] != '') {
412 412
                                         if ($pc->getClassCategory1() != null && $pc->getClassCategory2() == null) {
413
-                                            $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)は設定できません。');
413
+                                            $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)は設定できません。');
414 414
                                         } else {
415 415
                                             if (preg_match('/^\d+$/', $classCategoryId2)) {
416 416
                                                 $ClassCategory2 = $this->classCategoryRepository->find($classCategoryId2);
417 417
                                                 if (!$ClassCategory2) {
418
-                                                    $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
418
+                                                    $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
419 419
                                                 } else {
420 420
                                                     if ($ClassCategory1 &&
421 421
                                                         ($ClassCategory1->getClassName()->getId() == $ClassCategory2->getClassName()->getId())
422 422
                                                     ) {
423
-                                                        $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。');
423
+                                                        $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)と規格分類2(ID)の規格名が同じです。');
424 424
                                                     }
425 425
                                                 }
426 426
                                             } else {
427
-                                                $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
427
+                                                $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
428 428
                                             }
429 429
 
430 430
                                         }
431 431
                                     } else {
432 432
                                         if ($pc->getClassCategory1() != null && $pc->getClassCategory2() != null) {
433
-                                            $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)に値を設定してください。');
433
+                                            $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)に値を設定してください。');
434 434
                                         }
435 435
                                     }
436 436
                                     $ProductClass = $this->createProductClass($row, $Product, $app, $data, $ClassCategory1, $ClassCategory2);
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
                                             if (preg_match('/^\d+$/', $deliveryFee) && $deliveryFee >= 0) {
442 442
                                                 $ProductClass->setDeliveryFee($deliveryFee);
443 443
                                             } else {
444
-                                                $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。');
444
+                                                $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。');
445 445
                                             }
446 446
                                         }
447 447
                                     }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                     foreach ($data as $row) {
532 532
 
533 533
                         if ($headerSize != count($row)) {
534
-                            $this->addErrors(($data->key() + 1) . '行目のCSVフォーマットが一致しません。');
534
+                            $this->addErrors(($data->key() + 1).'行目のCSVフォーマットが一致しません。');
535 535
                             return $this->render($app, $form, $headers);
536 536
                         }
537 537
 
@@ -539,23 +539,23 @@  discard block
 block discarded – undo
539 539
                             $Category = new Category();
540 540
                         } else {
541 541
                             if (!preg_match('/^\d+$/', $row['カテゴリID'])) {
542
-                                $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。');
542
+                                $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。');
543 543
                                 return $this->render($app, $form, $headers);
544 544
                             }
545 545
                             $Category = $this->categoryRepository->find($row['カテゴリID']);
546 546
                             if (!$Category) {
547
-                                $this->addErrors(($data->key() + 1) . '行目のカテゴリIDが存在しません。');
547
+                                $this->addErrors(($data->key() + 1).'行目のカテゴリIDが存在しません。');
548 548
                                 return $this->render($app, $form, $headers);
549 549
                             }
550 550
                             if ($row['カテゴリID'] == $row['親カテゴリID']) {
551
-                                $this->addErrors(($data->key() + 1) . '行目のカテゴリIDと親カテゴリIDが同じです。');
551
+                                $this->addErrors(($data->key() + 1).'行目のカテゴリIDと親カテゴリIDが同じです。');
552 552
                                 return $this->render($app, $form, $headers);
553 553
                             }
554 554
 
555 555
                         }
556 556
 
557 557
                         if (Str::isBlank($row['カテゴリ名'])) {
558
-                            $this->addErrors(($data->key() + 1) . '行目のカテゴリ名が設定されていません。');
558
+                            $this->addErrors(($data->key() + 1).'行目のカテゴリ名が設定されていません。');
559 559
                             return $this->render($app, $form, $headers);
560 560
                         } else {
561 561
                             $Category->setName(Str::trimAll($row['カテゴリ名']));
@@ -564,13 +564,13 @@  discard block
 block discarded – undo
564 564
                         if ($row['親カテゴリID'] != '') {
565 565
 
566 566
                             if (!preg_match('/^\d+$/', $row['親カテゴリID'])) {
567
-                                $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。');
567
+                                $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。');
568 568
                                 return $this->render($app, $form, $headers);
569 569
                             }
570 570
 
571 571
                             $ParentCategory = $this->categoryRepository->find($row['親カテゴリID']);
572 572
                             if (!$ParentCategory) {
573
-                                $this->addErrors(($data->key() + 1) . '行目の親カテゴリIDが存在しません。');
573
+                                $this->addErrors(($data->key() + 1).'行目の親カテゴリIDが存在しません。');
574 574
                                 return $this->render($app, $form, $headers);
575 575
                             }
576 576
 
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
                         }
587 587
 
588 588
                         if ($this->appConfig['category_nest_level'] < $Category->getHierarchy()) {
589
-                            $this->addErrors(($data->key() + 1) . '行目のカテゴリが最大レベルを超えているため設定できません。');
589
+                            $this->addErrors(($data->key() + 1).'行目のカテゴリが最大レベルを超えているため設定できません。');
590 590
                             return $this->render($app, $form, $headers);
591 591
                         }
592 592
 
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
             throw new NotFoundHttpException();
637 637
         }
638 638
 
639
-        $response->setCallback(function () use ($app, $request, $headers) {
639
+        $response->setCallback(function() use ($app, $request, $headers) {
640 640
 
641 641
             // ヘッダ行の出力
642 642
             $row = array();
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
         });
652 652
 
653 653
         $response->headers->set('Content-Type', 'application/octet-stream');
654
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
654
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
655 655
         $response->send();
656 656
 
657 657
         return $response;
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
         if (!empty($this->fileName)) {
675 675
             try {
676 676
                 $fs = new Filesystem();
677
-                $fs->remove($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName);
677
+                $fs->remove($this->appConfig['csv_temp_realdir'].'/'.$this->fileName);
678 678
             } catch (\Exception $e) {
679 679
                 // エラーが発生しても無視する
680 680
             }
@@ -697,10 +697,10 @@  discard block
 block discarded – undo
697 697
     protected function getImportData($app, $formFile)
698 698
     {
699 699
         // アップロードされたCSVファイルを一時ディレクトリに保存
700
-        $this->fileName = 'upload_' . Str::random() . '.' . $formFile->getClientOriginalExtension();
700
+        $this->fileName = 'upload_'.Str::random().'.'.$formFile->getClientOriginalExtension();
701 701
         $formFile->move($this->appConfig['csv_temp_realdir'], $this->fileName);
702 702
 
703
-        $file = file_get_contents($this->appConfig['csv_temp_realdir'] . '/' . $this->fileName);
703
+        $file = file_get_contents($this->appConfig['csv_temp_realdir'].'/'.$this->fileName);
704 704
 
705 705
         if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) {
706 706
             // Windows 環境の PHP7 の場合はファイルエンコーディングを CP932 に合わせる
@@ -796,8 +796,8 @@  discard block
 block discarded – undo
796 796
                 if (!$Category) {
797 797
                     $this->addErrors(($data->key() + 1).'行目の商品カテゴリ(ID)「'.$category.'」が存在しません。');
798 798
                 } else {
799
-                    foreach($Category->getPath() as $ParentCategory){
800
-                        if (!isset($categoriesIdList[$ParentCategory->getId()])){
799
+                    foreach ($Category->getPath() as $ParentCategory) {
800
+                        if (!isset($categoriesIdList[$ParentCategory->getId()])) {
801 801
                             $ProductCategory = $this->makeProductCategory($Product, $ParentCategory, $rank);
802 802
                             $this->entityManager->persist($ProductCategory);
803 803
                             $rank++;
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
                             $categoriesIdList[$ParentCategory->getId()] = true;
806 806
                         }
807 807
                     }
808
-                    if (!isset($categoriesIdList[$Category->getId()])){
808
+                    if (!isset($categoriesIdList[$Category->getId()])) {
809 809
                         $ProductCategory = $this->makeProductCategory($Product, $Category, $rank);
810 810
                         $rank++;
811 811
                         $this->em->persist($ProductCategory);
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
                 }
861 861
             }
862 862
             if (!$Tag) {
863
-                $this->addErrors(($data->key() + 1) . '行目のタグ(ID)「' . $tag_id . '」が存在しません。');
863
+                $this->addErrors(($data->key() + 1).'行目のタグ(ID)「'.$tag_id.'」が存在しません。');
864 864
             }
865 865
         }
866 866
     }
@@ -879,17 +879,17 @@  discard block
 block discarded – undo
879 879
 
880 880
 
881 881
         if ($row['商品種別(ID)'] == '') {
882
-            $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。');
882
+            $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。');
883 883
         } else {
884 884
             if (preg_match('/^\d+$/', $row['商品種別(ID)'])) {
885 885
                 $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']);
886 886
                 if (!$ProductType) {
887
-                    $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。');
887
+                    $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。');
888 888
                 } else {
889 889
                     $ProductClass->setProductType($ProductType);
890 890
                 }
891 891
             } else {
892
-                $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。');
892
+                $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。');
893 893
             }
894 894
         }
895 895
 
@@ -900,12 +900,12 @@  discard block
 block discarded – undo
900 900
             if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) {
901 901
                 $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']);
902 902
                 if (!$DeliveryDate) {
903
-                    $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。');
903
+                    $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。');
904 904
                 } else {
905 905
                     $ProductClass->setDeliveryDate($DeliveryDate);
906 906
                 }
907 907
             } else {
908
-                $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。');
908
+                $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。');
909 909
             }
910 910
         }
911 911
 
@@ -916,19 +916,19 @@  discard block
 block discarded – undo
916 916
         }
917 917
 
918 918
         if ($row['在庫数無制限フラグ'] == '') {
919
-            $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。');
919
+            $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。');
920 920
         } else {
921 921
             if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) {
922 922
                 $ProductClass->setStockUnlimited(false);
923 923
                 // 在庫数が設定されていなければエラー
924 924
                 if ($row['在庫数'] == '') {
925
-                    $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。');
925
+                    $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。');
926 926
                 } else {
927 927
                     $stock = str_replace(',', '', $row['在庫数']);
928 928
                     if (preg_match('/^\d+$/', $stock) && $stock >= 0) {
929 929
                         $ProductClass->setStock($stock);
930 930
                     } else {
931
-                        $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。');
931
+                        $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。');
932 932
                     }
933 933
                 }
934 934
 
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
                 $ProductClass->setStockUnlimited(true);
937 937
                 $ProductClass->setStock(null);
938 938
             } else {
939
-                $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。');
939
+                $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。');
940 940
             }
941 941
         }
942 942
 
@@ -945,7 +945,7 @@  discard block
 block discarded – undo
945 945
             if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) {
946 946
                 $ProductClass->setSaleLimit($saleLimit);
947 947
             } else {
948
-                $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。');
948
+                $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。');
949 949
             }
950 950
         }
951 951
 
@@ -954,18 +954,18 @@  discard block
 block discarded – undo
954 954
             if (preg_match('/^\d+$/', $price01) && $price01 >= 0) {
955 955
                 $ProductClass->setPrice01($price01);
956 956
             } else {
957
-                $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。');
957
+                $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。');
958 958
             }
959 959
         }
960 960
 
961 961
         if ($row['販売価格'] == '') {
962
-            $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。');
962
+            $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。');
963 963
         } else {
964 964
             $price02 = str_replace(',', '', $row['販売価格']);
965 965
             if (preg_match('/^\d+$/', $price02) && $price02 >= 0) {
966 966
                 $ProductClass->setPrice02($price02);
967 967
             } else {
968
-                $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。');
968
+                $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。');
969 969
             }
970 970
         }
971 971
 
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
             if (preg_match('/^\d+$/', $delivery_fee) && $delivery_fee >= 0) {
975 975
                 $ProductClass->setDeliveryFee($delivery_fee);
976 976
             } else {
977
-                $this->addErrors(($data->key() + 1) . '行目の送料は0以上の数値を設定してください。');
977
+                $this->addErrors(($data->key() + 1).'行目の送料は0以上の数値を設定してください。');
978 978
             }
979 979
         }
980 980
 
@@ -1007,17 +1007,17 @@  discard block
 block discarded – undo
1007 1007
         $ProductClass->setProduct($Product);
1008 1008
 
1009 1009
         if ($row['商品種別(ID)'] == '') {
1010
-            $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が設定されていません。');
1010
+            $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が設定されていません。');
1011 1011
         } else {
1012 1012
             if (preg_match('/^\d+$/', $row['商品種別(ID)'])) {
1013 1013
                 $ProductType = $this->productTypeRepository->find($row['商品種別(ID)']);
1014 1014
                 if (!$ProductType) {
1015
-                    $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。');
1015
+                    $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。');
1016 1016
                 } else {
1017 1017
                     $ProductClass->setProductType($ProductType);
1018 1018
                 }
1019 1019
             } else {
1020
-                $this->addErrors(($data->key() + 1) . '行目の商品種別(ID)が存在しません。');
1020
+                $this->addErrors(($data->key() + 1).'行目の商品種別(ID)が存在しません。');
1021 1021
             }
1022 1022
         }
1023 1023
 
@@ -1026,12 +1026,12 @@  discard block
 block discarded – undo
1026 1026
             if (preg_match('/^\d+$/', $row['規格分類1(ID)'])) {
1027 1027
                 $ClassCategory = $this->classCategoryRepository->find($row['規格分類1(ID)']);
1028 1028
                 if (!$ClassCategory) {
1029
-                    $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
1029
+                    $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
1030 1030
                 } else {
1031 1031
                     $ProductClass->setClassCategory1($ClassCategory);
1032 1032
                 }
1033 1033
             } else {
1034
-                $this->addErrors(($data->key() + 1) . '行目の規格分類1(ID)が存在しません。');
1034
+                $this->addErrors(($data->key() + 1).'行目の規格分類1(ID)が存在しません。');
1035 1035
             }
1036 1036
         }
1037 1037
 
@@ -1039,12 +1039,12 @@  discard block
 block discarded – undo
1039 1039
             if (preg_match('/^\d+$/', $row['規格分類2(ID)'])) {
1040 1040
                 $ClassCategory = $this->classCategoryRepository->find($row['規格分類2(ID)']);
1041 1041
                 if (!$ClassCategory) {
1042
-                    $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
1042
+                    $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
1043 1043
                 } else {
1044 1044
                     $ProductClass->setClassCategory2($ClassCategory);
1045 1045
                 }
1046 1046
             } else {
1047
-                $this->addErrors(($data->key() + 1) . '行目の規格分類2(ID)が存在しません。');
1047
+                $this->addErrors(($data->key() + 1).'行目の規格分類2(ID)が存在しません。');
1048 1048
             }
1049 1049
         }
1050 1050
 
@@ -1052,12 +1052,12 @@  discard block
 block discarded – undo
1052 1052
             if (preg_match('/^\d+$/', $row['発送日目安(ID)'])) {
1053 1053
                 $DeliveryDate = $this->deliveryDateRepository->find($row['発送日目安(ID)']);
1054 1054
                 if (!$DeliveryDate) {
1055
-                    $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。');
1055
+                    $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。');
1056 1056
                 } else {
1057 1057
                     $ProductClass->setDeliveryDate($DeliveryDate);
1058 1058
                 }
1059 1059
             } else {
1060
-                $this->addErrors(($data->key() + 1) . '行目の発送日目安(ID)が存在しません。');
1060
+                $this->addErrors(($data->key() + 1).'行目の発送日目安(ID)が存在しません。');
1061 1061
             }
1062 1062
         }
1063 1063
 
@@ -1068,19 +1068,19 @@  discard block
 block discarded – undo
1068 1068
         }
1069 1069
 
1070 1070
         if ($row['在庫数無制限フラグ'] == '') {
1071
-            $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。');
1071
+            $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。');
1072 1072
         } else {
1073 1073
             if ($row['在庫数無制限フラグ'] == (string) Constant::DISABLED) {
1074 1074
                 $ProductClass->setStockUnlimited(false);
1075 1075
                 // 在庫数が設定されていなければエラー
1076 1076
                 if ($row['在庫数'] == '') {
1077
-                    $this->addErrors(($data->key() + 1) . '行目の在庫数が設定されていません。');
1077
+                    $this->addErrors(($data->key() + 1).'行目の在庫数が設定されていません。');
1078 1078
                 } else {
1079 1079
                     $stock = str_replace(',', '', $row['在庫数']);
1080 1080
                     if (preg_match('/^\d+$/', $stock) && $stock >= 0) {
1081 1081
                         $ProductClass->setStock($row['在庫数']);
1082 1082
                     } else {
1083
-                        $this->addErrors(($data->key() + 1) . '行目の在庫数は0以上の数値を設定してください。');
1083
+                        $this->addErrors(($data->key() + 1).'行目の在庫数は0以上の数値を設定してください。');
1084 1084
                     }
1085 1085
                 }
1086 1086
 
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
                 $ProductClass->setStockUnlimited(true);
1089 1089
                 $ProductClass->setStock(null);
1090 1090
             } else {
1091
-                $this->addErrors(($data->key() + 1) . '行目の在庫数無制限フラグが設定されていません。');
1091
+                $this->addErrors(($data->key() + 1).'行目の在庫数無制限フラグが設定されていません。');
1092 1092
             }
1093 1093
         }
1094 1094
 
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
             if (preg_match('/^\d+$/', $saleLimit) && $saleLimit >= 0) {
1098 1098
                 $ProductClass->setSaleLimit($saleLimit);
1099 1099
             } else {
1100
-                $this->addErrors(($data->key() + 1) . '行目の販売制限数は0以上の数値を設定してください。');
1100
+                $this->addErrors(($data->key() + 1).'行目の販売制限数は0以上の数値を設定してください。');
1101 1101
             }
1102 1102
         }
1103 1103
 
@@ -1106,18 +1106,18 @@  discard block
 block discarded – undo
1106 1106
             if (preg_match('/^\d+$/', $price01) && $price01 >= 0) {
1107 1107
                 $ProductClass->setPrice01($price01);
1108 1108
             } else {
1109
-                $this->addErrors(($data->key() + 1) . '行目の通常価格は0以上の数値を設定してください。');
1109
+                $this->addErrors(($data->key() + 1).'行目の通常価格は0以上の数値を設定してください。');
1110 1110
             }
1111 1111
         }
1112 1112
 
1113 1113
         if ($row['販売価格'] == '') {
1114
-            $this->addErrors(($data->key() + 1) . '行目の販売価格が設定されていません。');
1114
+            $this->addErrors(($data->key() + 1).'行目の販売価格が設定されていません。');
1115 1115
         } else {
1116 1116
             $price02 = str_replace(',', '', $row['販売価格']);
1117 1117
             if (preg_match('/^\d+$/', $price02) && $price02 >= 0) {
1118 1118
                 $ProductClass->setPrice02($price02);
1119 1119
             } else {
1120
-                $this->addErrors(($data->key() + 1) . '行目の販売価格は0以上の数値を設定してください。');
1120
+                $this->addErrors(($data->key() + 1).'行目の販売価格は0以上の数値を設定してください。');
1121 1121
             }
1122 1122
         }
1123 1123
 
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ProductController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                     }
319 319
 
320 320
                     $extension = $image->getClientOriginalExtension();
321
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
321
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
322 322
                     $image->move($this->appConfig['image_temp_realdir'], $filename);
323 323
                     $files[] = $filename;
324 324
                 }
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
                 $Categories = $form->get('Category')->getData();
480 480
                 $categoriesIdList = array();
481 481
                 foreach ($Categories as $Category) {
482
-                    foreach($Category->getPath() as $ParentCategory){
483
-                        if (!isset($categoriesIdList[$ParentCategory->getId()])){
482
+                    foreach ($Category->getPath() as $ParentCategory) {
483
+                        if (!isset($categoriesIdList[$ParentCategory->getId()])) {
484 484
                             $ProductCategory = $this->createProductCategory($Product, $ParentCategory, $count);
485 485
                             $this->entityManager->persist($ProductCategory);
486 486
                             $count++;
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
                             $categoriesIdList[$ParentCategory->getId()] = true;
490 490
                         }
491 491
                     }
492
-                    if (!isset($categoriesIdList[$Category->getId()])){
492
+                    if (!isset($categoriesIdList[$Category->getId()])) {
493 493
                         $ProductCategory = $this->createProductCategory($Product, $Category, $count);
494 494
                         $this->entityManager->persist($ProductCategory);
495 495
                         $count++;
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
                     $this->entityManager->persist($ProductImage);
512 512
 
513 513
                     // 移動
514
-                    $file = new File($this->appConfig['image_temp_realdir'] . '/' . $add_image);
514
+                    $file = new File($this->appConfig['image_temp_realdir'].'/'.$add_image);
515 515
                     $file->move($this->appConfig['image_save_realdir']);
516 516
                 }
517 517
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 
532 532
                     // 削除
533 533
                     $fs = new Filesystem();
534
-                    $fs->remove($this->appConfig['image_save_realdir'] . '/' . $delete_image);
534
+                    $fs->remove($this->appConfig['image_save_realdir'].'/'.$delete_image);
535 535
                 }
536 536
                 $this->entityManager->persist($Product);
537 537
                 $this->entityManager->flush();
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
                     foreach ($deleteImages as $deleteImage) {
667 667
                         try {
668 668
                             $fs = new Filesystem();
669
-                            $fs->remove($this->appConfig['image_save_realdir'] . '/' . $deleteImage);
669
+                            $fs->remove($this->appConfig['image_save_realdir'].'/'.$deleteImage);
670 670
                         } catch (\Exception $e) {
671 671
                             // エラーが発生しても無視する
672 672
                         }
@@ -741,10 +741,10 @@  discard block
 block discarded – undo
741 741
 
742 742
                     // 画像ファイルを新規作成
743 743
                     $extension = pathinfo($Image->getFileName(), PATHINFO_EXTENSION);
744
-                    $filename = date('mdHis') . uniqid('_') . '.' . $extension;
744
+                    $filename = date('mdHis').uniqid('_').'.'.$extension;
745 745
                     try {
746 746
                         $fs = new Filesystem();
747
-                        $fs->copy($this->appConfig['image_save_realdir'] . '/' . $Image->getFileName(), $this->appConfig['image_save_realdir'] . '/' . $filename);
747
+                        $fs->copy($this->appConfig['image_save_realdir'].'/'.$Image->getFileName(), $this->appConfig['image_save_realdir'].'/'.$filename);
748 748
                     } catch (\Exception $e) {
749 749
                         // エラーが発生しても無視する
750 750
                     }
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
         $em->getConfiguration()->setSQLLogger(null);
825 825
 
826 826
         $response = new StreamedResponse();
827
-        $response->setCallback(function () use ($app, $request) {
827
+        $response->setCallback(function() use ($app, $request) {
828 828
 
829 829
             // CSV種別を元に初期化.
830 830
             $this->csvExportService->initCsvType(CsvType::CSV_TYPE_PRODUCT);
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
             // データ行の出力.
865 865
             $this->csvExportService->setExportQueryBuilder($qb);
866 866
 
867
-            $this->csvExportService->exportData(function ($entity, CsvExportService $csvService) use ($app, $request) {
867
+            $this->csvExportService->exportData(function($entity, CsvExportService $csvService) use ($app, $request) {
868 868
                 $Csvs = $csvService->getCsvs();
869 869
 
870 870
                 /** @var $Product \Eccube\Entity\Product */
@@ -907,9 +907,9 @@  discard block
 block discarded – undo
907 907
         });
908 908
 
909 909
         $now = new \DateTime();
910
-        $filename = 'product_' . $now->format('YmdHis') . '.csv';
910
+        $filename = 'product_'.$now->format('YmdHis').'.csv';
911 911
         $response->headers->set('Content-Type', 'application/octet-stream');
912
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
912
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
913 913
         $response->send();
914 914
 
915 915
         log_info('商品CSV出力ファイル名', array($filename));
Please login to merge, or discard this patch.
src/Eccube/Service/PluginService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     {
144 144
         // Proxyのクラスをロードせずにスキーマを更新するために、
145 145
         // インストール時には一時的なディレクトリにProxyを生成する
146
-        $tmpProxyOutputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12);
146
+        $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.Str::random(12);
147 147
         @mkdir($tmpProxyOutputDir);
148 148
 
149 149
         try {
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             if (!empty($config_cache)) {
210 210
                 $meta = $config_cache;
211 211
             } else {
212
-                $meta = $this->readYml($dir . '/config.yml');
212
+                $meta = $this->readYml($dir.'/config.yml');
213 213
             }
214 214
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
215 215
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
Please login to merge, or discard this patch.
src/Eccube/Application.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $this->register(new MobileDetectServiceProvider());
207 207
         $this->register(new TwigLintServiceProvider());
208 208
 
209
-        $this->error(function (\Exception $e, Request $request, $code) {
209
+        $this->error(function(\Exception $e, Request $request, $code) {
210 210
             if ($this['debug']) {
211 211
                 return;
212 212
             }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 
274 274
         $pluginSubDirs = (function($dirName) use ($enabledPluginDirs) {
275 275
             return array_map(function($pluginDir) use ($dirName) {
276
-                return $pluginDir . '/' . $dirName;
276
+                return $pluginDir.'/'.$dirName;
277 277
             }, $enabledPluginDirs);
278 278
         });
279 279
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             return $router;
345 345
         });
346 346
 
347
-        $this['eccube.router.origin'] = function ($app) {
347
+        $this['eccube.router.origin'] = function($app) {
348 348
             $resource = __DIR__.'/Controller';
349 349
             $cachePrefix = 'Origin';
350 350
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
         $this['eccube.routers.plugin'] = [];
355 355
 
356 356
         if (isset($this['config']['vendor_dir']) && file_exists($this['config']['vendor_dir'].'/Controller')) {
357
-            $this['eccube.router.extend'] = function ($app) {
357
+            $this['eccube.router.extend'] = function($app) {
358 358
                 $resource = $app['config']['vendor_dir'].'/Controller';
359 359
                 $cachePrefix = 'Extend';
360 360
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                 return $router;
364 364
             };
365 365
         }
366
-        $this->extend('request_matcher', function ($matcher, $app) {
366
+        $this->extend('request_matcher', function($matcher, $app) {
367 367
             $matchers = [];
368 368
             if (isset($app['eccube.router.extend'])) {
369 369
                 $matchers[] = $app['eccube.router.extend'];
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             return new ChainUrlMatcher($matchers, $app['request_context']);
378 378
         });
379 379
 
380
-        $this->extend('url_generator', function ($generator, $app) {
380
+        $this->extend('url_generator', function($generator, $app) {
381 381
             $generators = [];
382 382
             if (isset($app['eccube.router.extend'])) {
383 383
                 $generators[] = $app['eccube.router.extend'];
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         });
393 393
 
394 394
         // Route CollectionにEC-CUBEで定義したルーティングを追加(debug tool barに出力するため)
395
-        $this->extend('routes', function ($routes, $app) {
395
+        $this->extend('routes', function($routes, $app) {
396 396
             if (isset($app['eccube.router.extend'])) {
397 397
                 $routes->addCollection($app['eccube.router.extend']->getRouteCollection());
398 398
             }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
428 428
             'locale_fallbacks' => ['ja', 'en'],
429 429
         ));
430
-        $this->extend('translator', function ($translator, \Silex\Application $app) {
430
+        $this->extend('translator', function($translator, \Silex\Application $app) {
431 431
             $translator->addLoader('php', new \Symfony\Component\Translation\Loader\PhpFileLoader());
432 432
 
433 433
             $file = __DIR__.'/Resource/locale/messages.'.$app['locale'].'.php';
@@ -470,14 +470,14 @@  discard block
 block discarded – undo
470 470
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
471 471
             'twig.form.templates' => array('Form/form_div_layout.twig'),
472 472
         ));
473
-        $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
473
+        $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
474 474
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
475 475
             $twig->addExtension(new \Twig_Extension_StringLoader());
476 476
 
477 477
             return $twig;
478 478
         });
479 479
 
480
-        $this->before(function (Request $request, \Silex\Application $app) {
480
+        $this->before(function(Request $request, \Silex\Application $app) {
481 481
             $app['admin'] = $app['front'] = false;
482 482
             $pathinfo = rawurldecode($request->getPathInfo());
483 483
             if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
                 }
494 494
                 $paths[] = $app['config']['template_admin_realdir'];
495 495
                 $paths[] = __DIR__.'/../../app/Plugin';
496
-                $cacheDir =  __DIR__.'/../../app/cache/twig/admin';
496
+                $cacheDir = __DIR__.'/../../app/cache/twig/admin';
497 497
             } else {
498 498
                 // モバイル端末時、smartphoneディレクトリを探索パスに追加する.
499 499
                 if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) {
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                 }
509 509
                 $paths[] = $app['config']['template_default_realdir'];
510 510
                 $paths[] = __DIR__.'/../../app/Plugin';
511
-                $cacheDir =  __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
511
+                $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
512 512
             }
513 513
             $app['twig']->setCache($app['debug'] ? null : $cacheDir);
514 514
             $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
         }, self::EARLY_EVENT);
527 527
 
528 528
         // twigのグローバル変数を定義.
529
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
529
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
530 530
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
531 531
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
532 532
             if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) {
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
612 612
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
613 613
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
614
-                \Swift::init(function () {
614
+                \Swift::init(function() {
615 615
                     \Swift_DependencyContainer::getInstance()
616 616
                         ->register('mime.qpheaderencoder')
617 617
                         ->asAliasOf('mime.base64headerencoder');
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
         $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider());
647 647
 
648 648
         $app = $this;
649
-        $this->extend('db.event_manager', function ($evm) use ($app) {
649
+        $this->extend('db.event_manager', function($evm) use ($app) {
650 650
             $initSubscriber = new InitSubscriber($app);
651 651
             $evm->addEventSubscriber($initSubscriber);
652 652
 
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
 
764 764
         $this->extend(
765 765
             'orm.em.config',
766
-            function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
766
+            function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
767 767
 
768 768
                 /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */
769 769
                 $chain = $config->getMetadataDriverImpl();
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
             }
786 786
         );
787 787
 
788
-        $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
788
+        $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
789 789
             // save
790 790
             $saveEventSubscriber = new \Eccube\Doctrine\EventSubscriber\SaveEventSubscriber($app);
791 791
             $em->getEventManager()->addEventSubscriber($saveEventSubscriber);
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
             // second level cacheの設定.
811 811
             $this->extend(
812 812
                 'orm.em.config',
813
-                function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
813
+                function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
814 814
                     $config->setSecondLevelCacheEnabled();
815 815
                     $cacheConfig = $config->getSecondLevelCacheConfiguration();
816 816
                     $regionConfig = $cacheConfig->getRegionsConfiguration();
@@ -899,31 +899,31 @@  discard block
 block discarded – undo
899 899
             array('^/mypage', 'ROLE_USER', $channel),
900 900
         );
901 901
 
902
-        $this['eccube.password_encoder'] = function ($app) {
902
+        $this['eccube.password_encoder'] = function($app) {
903 903
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
904 904
         };
905
-        $this['security.encoder_factory'] = function ($app) {
905
+        $this['security.encoder_factory'] = function($app) {
906 906
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
907 907
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
908 908
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
909 909
             ));
910 910
         };
911
-        $this['eccube.event_listner.security'] = function ($app) {
911
+        $this['eccube.event_listner.security'] = function($app) {
912 912
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
913 913
         };
914 914
 
915 915
         // Voterの設定
916
-        $this['authority_voter'] = function ($app) {
916
+        $this['authority_voter'] = function($app) {
917 917
             return new \Eccube\Security\Voter\AuthorityVoter($app);
918 918
         };
919 919
 
920
-        $this->extend('security.voters', function ($voters, \Silex\Application $app) {
920
+        $this->extend('security.voters', function($voters, \Silex\Application $app) {
921 921
             $voters[] = $app['authority_voter'];
922 922
 
923 923
             return $voters;
924 924
         });
925 925
 
926
-        $this['security.access_manager'] = function ($app) {
926
+        $this['security.access_manager'] = function($app) {
927 927
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
928 928
         };
929 929
 
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
     {
938 938
         $config = $this['config'];
939 939
         if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) {
940
-            $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) {
940
+            $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) {
941 941
                 // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する
942 942
                 Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies']));
943 943
             }, self::EARLY_EVENT);
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
         $this->register(new ServiceProvider\EccubePluginServiceProvider());
955 955
 
956 956
         // TODO Acme\ServiceProvider の初期化はここで OK?
957
-        if (array_key_exists('service',$this['config'])) {
957
+        if (array_key_exists('service', $this['config'])) {
958 958
             foreach ($this['config']['service'] as $service) {
959 959
                 $this->register(new $service);
960 960
             }
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
         $app = $this;
1097 1097
 
1098 1098
         // Response Event(http cache対応、event実行は一番遅く設定)
1099
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1099
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1100 1100
 
1101 1101
             if (!$event->isMasterRequest()) {
1102 1102
                 return;
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/PagenatorServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function register(Container $app)
13 13
     {
14
-        $app['paginator'] = $app->protect(function () {
14
+        $app['paginator'] = $app->protect(function() {
15 15
             $paginator = new Paginator();
16 16
             $paginator->subscribe(new PaginatorListener());
17 17
 
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/PurchaseFlowServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 {
27 27
     public function register(Container $app)
28 28
     {
29
-        $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null) {
29
+        $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null) {
30 30
             return new PurchaseContext($origin);
31 31
         });
32 32
 
33
-        $app['eccube.purchase.flow.cart.item_processors'] = function (Container $app) {
33
+        $app['eccube.purchase.flow.cart.item_processors'] = function(Container $app) {
34 34
             $processors = new ArrayCollection();
35 35
             $processors[] = new DisplayStatusValidator();
36 36
             $processors[] = new SaleLimitValidator();
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return $processors;
41 41
         };
42 42
 
43
-        $app['eccube.purchase.flow.cart.holder_processors'] = function (Container $app) {
43
+        $app['eccube.purchase.flow.cart.holder_processors'] = function(Container $app) {
44 44
             $processors = new ArrayCollection();
45 45
             $processors[] = new PaymentProcessor($app[DeliveryRepository::class]);
46 46
             $processors[] = new PaymentTotalLimitValidator($app['config']['max_total_fee']);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             return $processors;
51 51
         };
52 52
 
53
-        $app['eccube.purchase.flow.cart'] = function (Container $app) {
53
+        $app['eccube.purchase.flow.cart'] = function(Container $app) {
54 54
             $flow = new PurchaseFlow();
55 55
             $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']);
56 56
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             return $flow;
59 59
         };
60 60
 
61
-        $app['eccube.purchase.flow.shopping.item_processors'] = function (Container $app) {
61
+        $app['eccube.purchase.flow.shopping.item_processors'] = function(Container $app) {
62 62
             $processors = new ArrayCollection();
63 63
             $processors[] = new StockValidator();
64 64
             $processors[] = new DisplayStatusValidator();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return $processors;
67 67
         };
68 68
 
69
-        $app['eccube.purchase.flow.shopping.holder_processors'] = function (Container $app) {
69
+        $app['eccube.purchase.flow.shopping.holder_processors'] = function(Container $app) {
70 70
             $processors = new ArrayCollection();
71 71
             $processors[] = new PaymentTotalLimitValidator($app['config']['max_total_fee']);
72 72
             $processors[] = new DeliveryFeeProcessor($app['orm.em']);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             return $processors;
76 76
         };
77 77
 
78
-        $app['eccube.purchase.flow.shopping'] = function (Container $app) {
78
+        $app['eccube.purchase.flow.shopping'] = function(Container $app) {
79 79
             $flow = new PurchaseFlow();
80 80
             $flow->setItemProcessors($app['eccube.purchase.flow.shopping.item_processors']);
81 81
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.shopping.holder_processors']);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             return $flow;
84 84
         };
85 85
 
86
-        $app['eccube.purchase.flow.order.item_processors'] = function (Container $app) {
86
+        $app['eccube.purchase.flow.order.item_processors'] = function(Container $app) {
87 87
             $processors = new ArrayCollection();
88 88
             $processors[] = new StockValidator();
89 89
             $processors[] = new PaymentTotalLimitValidator($app['config']['max_total_fee']);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             return $processors;
92 92
         };
93 93
 
94
-        $app['eccube.purchase.flow.order.holder_processors'] = function (Container $app) {
94
+        $app['eccube.purchase.flow.order.holder_processors'] = function(Container $app) {
95 95
             $processors = new ArrayCollection();
96 96
             $processors[] = new UpdateDatePurchaseProcessor($app['config']);
97 97
             $processors[] = new AdminOrderRegisterPurchaseProcessor($app);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             return $processors;
100 100
         };
101 101
 
102
-        $app['eccube.purchase.flow.order'] = function (Container $app) {
102
+        $app['eccube.purchase.flow.order'] = function(Container $app) {
103 103
             $flow = new PurchaseFlow();
104 104
             $flow->setItemProcessors($app['eccube.purchase.flow.order.item_processors']);
105 105
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.order.holder_processors']);
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/QueriesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function register(Container $app)
22 22
     {
23
-        $app['eccube.queries'] = function () {
23
+        $app['eccube.queries'] = function() {
24 24
             return new \Eccube\Doctrine\Query\Queries();
25 25
         };
26 26
     }
Please login to merge, or discard this patch.