Completed
Push — fix_travis ( e39dc3 )
by Ryo
315:01 queued 308:56
created
src/Eccube/Application.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -964,7 +964,7 @@
 block discarded – undo
964 964
      * 失敗 : \Doctrine\DBAL\DBALExceptionエラーが発生( 接続に失敗した場合 )、エラー画面を表示しdie()
965 965
      * 備考 : app['debug']がtrueの際は処理を行わない
966 966
      *
967
-     * @return boolean true
967
+     * @return null|boolean true
968 968
      *
969 969
      */
970 970
     protected function checkDatabaseConnection()
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $this->register(new MobileDetectServiceProvider());
147 147
 
148 148
         $app = $this;
149
-        $this->error(function (\Exception $e, $code) use ($app) {
149
+        $this->error(function(\Exception $e, $code) use ($app) {
150 150
             if ($app['debug']) {
151 151
                 return;
152 152
             }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             'locale' => $this['config']['locale'],
215 215
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
216 216
         ));
217
-        $this['translator'] = $this->share($this->extend('translator', function ($translator, \Silex\Application $app) {
217
+        $this['translator'] = $this->share($this->extend('translator', function($translator, \Silex\Application $app) {
218 218
             $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader());
219 219
 
220 220
             $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml';
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
262 262
             'twig.form.templates' => array('Form/form_layout.twig'),
263 263
         ));
264
-        $this['twig'] = $this->share($this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
264
+        $this['twig'] = $this->share($this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
265 265
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
266 266
             $twig->addExtension(new \Twig_Extension_StringLoader());
267 267
 
268 268
             return $twig;
269 269
         }));
270 270
 
271
-        $this->before(function (Request $request, \Silex\Application $app) {
271
+        $this->before(function(Request $request, \Silex\Application $app) {
272 272
             $app['admin'] = false;
273 273
             $app['front'] = false;
274 274
             $pathinfo = rawurldecode($request->getPathInfo());
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             }
280 280
 
281 281
             // フロント or 管理画面ごとにtwigの探索パスを切り替える.
282
-            $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
282
+            $app['twig'] = $app->share($app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
283 283
                 $paths = array();
284 284
 
285 285
                 // 互換性がないのでprofiler とproduction 時のcacheを分離する
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
         // twigのグローバル変数を定義.
328 328
         $app = $this;
329
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
329
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
330 330
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
331 331
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
332 332
             if (isset($app['twig_global_initialized']) && $app['twig_global_initialized'] === true) {
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
393 393
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
394 394
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
395
-                \Swift::init(function () {
395
+                \Swift::init(function() {
396 396
                     \Swift_DependencyContainer::getInstance()
397 397
                         ->register('mime.qpheaderencoder')
398 398
                         ->asAliasOf('mime.base64headerencoder');
@@ -572,19 +572,19 @@  discard block
 block discarded – undo
572 572
             array('^/mypage', 'ROLE_USER', $channel),
573 573
         );
574 574
 
575
-        $this['eccube.password_encoder'] = $this->share(function ($app) {
575
+        $this['eccube.password_encoder'] = $this->share(function($app) {
576 576
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
577 577
         });
578
-        $this['security.encoder_factory'] = $this->share(function ($app) {
578
+        $this['security.encoder_factory'] = $this->share(function($app) {
579 579
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
580 580
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
581 581
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
582 582
             ));
583 583
         });
584
-        $this['eccube.event_listner.security'] = $this->share(function ($app) {
584
+        $this['eccube.event_listner.security'] = $this->share(function($app) {
585 585
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
586 586
         });
587
-        $this['user'] = function ($app) {
587
+        $this['user'] = function($app) {
588 588
             $token = $app['security']->getToken();
589 589
 
590 590
             return ($token !== null) ? $token->getUser() : null;
@@ -595,17 +595,17 @@  discard block
 block discarded – undo
595 595
 
596 596
         // Voterの設定
597 597
         $app = $this;
598
-        $this['authority_voter'] = $this->share(function ($app) {
598
+        $this['authority_voter'] = $this->share(function($app) {
599 599
             return new \Eccube\Security\Voter\AuthorityVoter($app);
600 600
         });
601 601
 
602
-        $app['security.voters'] = $app->extend('security.voters', function ($voters) use ($app) {
602
+        $app['security.voters'] = $app->extend('security.voters', function($voters) use ($app) {
603 603
             $voters[] = $app['authority_voter'];
604 604
 
605 605
             return $voters;
606 606
         });
607 607
 
608
-        $this['security.access_manager'] = $this->share(function ($app) {
608
+        $this['security.access_manager'] = $this->share(function($app) {
609 609
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
610 610
         });
611 611
 
@@ -629,14 +629,14 @@  discard block
 block discarded – undo
629 629
     public function initPluginEventDispatcher()
630 630
     {
631 631
         // EventDispatcher
632
-        $this['eccube.event.dispatcher'] = $this->share(function () {
632
+        $this['eccube.event.dispatcher'] = $this->share(function() {
633 633
             return new EventDispatcher();
634 634
         });
635 635
 
636 636
         $app = $this;
637 637
 
638 638
         // hook point
639
-        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
639
+        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
640 640
             if (!$event->isMasterRequest()) {
641 641
                 return;
642 642
             }
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
645 645
         }, self::EARLY_EVENT);
646 646
 
647
-        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
647
+        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
648 648
             if (!$event->isMasterRequest()) {
649 649
                 return;
650 650
             }
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
654 654
         });
655 655
 
656
-        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
656
+        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
657 657
             if (!$event->isMasterRequest()) {
658 658
                 return;
659 659
             }
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
663 663
         });
664 664
 
665
-        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
665
+        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
666 666
             if (!$event->isMasterRequest()) {
667 667
                 return;
668 668
             }
@@ -670,13 +670,13 @@  discard block
 block discarded – undo
670 670
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
671 671
         }, self::LATE_EVENT);
672 672
 
673
-        $this->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) {
673
+        $this->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) {
674 674
             $route = $event->getRequest()->attributes->get('_route');
675 675
             $hookpoint = "eccube.event.controller.$route.finish";
676 676
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
677 677
         });
678 678
 
679
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
679
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
680 680
             if (!$event->isMasterRequest()) {
681 681
                 return;
682 682
             }
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
         });
686 686
 
687 687
         // Request Event
688
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
688
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
689 689
 
690 690
             if (!$event->isMasterRequest()) {
691 691
                 return;
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
         }, 30); // Routing(32)が解決しし, 認証判定(8)が実行される前のタイミング.
717 717
 
718 718
         // Controller Event
719
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
719
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
720 720
 
721 721
             if (!$event->isMasterRequest()) {
722 722
                 return;
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
         });
747 747
 
748 748
         // Response Event
749
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
749
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
750 750
             if (!$event->isMasterRequest()) {
751 751
                 return;
752 752
             }
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         });
776 776
 
777 777
         // Exception Event
778
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
778
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
779 779
 
780 780
             if (!$event->isMasterRequest()) {
781 781
                 return;
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
         });
806 806
 
807 807
         // Terminate Event
808
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
808
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
809 809
 
810 810
             $route = $event->getRequest()->attributes->get('_route');
811 811
 
@@ -876,7 +876,7 @@  discard block
 block discarded – undo
876 876
 
877 877
             // const
878 878
             if (isset($config['const'])) {
879
-                $this['config'] = $this->share($this->extend('config', function ($eccubeConfig) use ($config) {
879
+                $this['config'] = $this->share($this->extend('config', function($eccubeConfig) use ($config) {
880 880
                     $eccubeConfig[$config['code']] = array(
881 881
                         'const' => $config['const'],
882 882
                     );
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
         $app = $this;
1080 1080
 
1081 1081
         // Response Event(http cache対応、event実行は一番遅く設定)
1082
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1082
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1083 1083
 
1084 1084
             if (!$event->isMasterRequest()) {
1085 1085
                 return;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Store/PluginController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@
 block discarded – undo
29 29
 use Eccube\Controller\AbstractController;
30 30
 use Eccube\Exception\PluginException;
31 31
 use Eccube\Util\Str;
32
-use Monolog\Logger;
33 32
 use Symfony\Component\Filesystem\Filesystem;
34 33
 use Symfony\Component\Finder\Finder;
35 34
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
html/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
 }
28 28
 
29 29
 //[INFO]index.php,install.phpをEC-CUBEルート直下に移動させる場合は、コメントアウトしている行に置き換える
30
-require __DIR__ . '/../autoload.php';
30
+require __DIR__.'/../autoload.php';
31 31
 //require __DIR__ . '/autoload.php';
32 32
 
33 33
 $app = new Eccube\InstallApplication();
34 34
 $app['debug'] = true;
35
-$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
35
+$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
36 36
     if (!$request->getSession()->isStarted()) {
37 37
         $request->getSession()->start();
38 38
     }
Please login to merge, or discard this patch.
html/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 //require __DIR__.'/autoload.php';
28 28
 
29 29
 ini_set('display_errors', 'Off');
30
-error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
30
+error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT);
31 31
 
32 32
 // see http://silex.sensiolabs.org/doc/web_servers.html#php-5-4
33 33
 $filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/CsvImportType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
                 'constraints' => array(
54 54
                     new Assert\NotBlank(array('message' => 'ファイルを選択してください。')),
55 55
                     new Assert\File(array(
56
-                        'maxSize' => $app['config']['csv_size'] . 'M',
57
-                        'maxSizeMessage' => 'CSVファイルは' . $app['config']['csv_size'] . 'M以下でアップロードしてください。',
56
+                        'maxSize' => $app['config']['csv_size'].'M',
57
+                        'maxSizeMessage' => 'CSVファイルは'.$app['config']['csv_size'].'M以下でアップロードしてください。',
58 58
                     )),
59 59
                 ),
60 60
             ));
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/ProductListMaxType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
      */
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
41
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
42 42
             $options = $event->getForm()->getConfig()->getOptions();
43 43
             if (!$event->getData()) {
44 44
                 $data = current(array_keys($options['choice_list']->getValues()));
45 45
                 $event->setData($data);
46 46
             }
47 47
         });
48
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
48
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
49 49
             $options = $event->getForm()->getConfig()->getOptions();
50 50
             $values = $options['choice_list']->getValues();
51 51
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/ProductListOrderByType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
      */
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
41
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
42 42
             $options = $event->getForm()->getConfig()->getOptions();
43 43
             if (!$event->getData()) {
44 44
                 $data = current(array_keys($options['choice_list']->getValues()));
45 45
                 $event->setData($data);
46 46
             }
47 47
         });
48
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
48
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
49 49
             $options = $event->getForm()->getConfig()->getOptions();
50 50
             $values = $options['choice_list']->getValues();
51 51
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step4Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 'label' => 'パスワード',
93 93
                 'required' => false,
94 94
             ))
95
-            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
95
+            ->addEventListener(FormEvents::POST_SUBMIT, function($event) {
96 96
                 $form = $event->getForm();
97 97
                 $data = $form->getData();
98 98
                 try {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                     $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
118 118
                     $conn->connect();
119 119
                 } catch (\Exception $e) {
120
-                    $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage()));
120
+                    $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage()));
121 121
                 }
122 122
             });
123 123
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     public function validate($data, ExecutionContext $context, $param = null)
134 134
     {
135 135
         $parameters = $this->app['request']->get('install_step4');
136
-        if ($parameters['database'] != 'pdo_sqlite'){
136
+        if ($parameters['database'] != 'pdo_sqlite') {
137 137
             $context->validateValue($data, array(
138 138
                 new Assert\NotBlank()
139 139
             ));
Please login to merge, or discard this patch.
src/Eccube/Form/Type/AddCartType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 }
113 113
             }
114 114
 
115
-            $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) {
115
+            $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) {
116 116
                 $data = $event->getData();
117 117
                 $form = $event->getForm();
118 118
                 if (!is_null($Product->getClassName2())) {
Please login to merge, or discard this patch.