Completed
Pull Request — master (#2152)
by NOBU
82:06 queued 38:49
created
src/Eccube/ServiceProvider/DebugServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 {
68 68
     public function register(Application $app)
69 69
     {
70
-        $app['var_dumper.cloner'] = $app->share(function ($app) {
70
+        $app['var_dumper.cloner'] = $app->share(function($app) {
71 71
             $cloner = new VarCloner();
72 72
 
73 73
             if (isset($app['debug.max_items'])) {
@@ -81,23 +81,23 @@  discard block
 block discarded – undo
81 81
             return $cloner;
82 82
         });
83 83
 
84
-        $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function ($templates) {
84
+        $app['data_collector.templates'] = $app->share($app->extend('data_collector.templates', function($templates) {
85 85
             return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig')));
86 86
         }));
87 87
 
88
-        $app['data_collector.dump'] = $app->share(function ($app) {
88
+        $app['data_collector.dump'] = $app->share(function($app) {
89 89
             return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format'], null, null, new HtmlDumper());
90 90
         });
91 91
 
92
-        $app['data_collectors'] = $app->share($app->extend('data_collectors', function ($collectors, $app) {
93
-            $collectors['dump'] = $app->share(function ($app) {
92
+        $app['data_collectors'] = $app->share($app->extend('data_collectors', function($collectors, $app) {
93
+            $collectors['dump'] = $app->share(function($app) {
94 94
                 return $app['data_collector.dump'];
95 95
             });
96 96
 
97 97
             return $collectors;
98 98
         }));
99 99
 
100
-        $app['twig'] = $app->share($app->extend('twig', function ($twig, $app) {
100
+        $app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
101 101
             if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) {
102 102
                 $twig->addExtension(new DumpExtension($app['var_dumper.cloner']));
103 103
             }
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
             return $twig;
106 106
         }));
107 107
 
108
-        $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function ($loader, $app) {
108
+        $app['twig.loader.filesystem'] = $app->share($app->extend('twig.loader.filesystem', function($loader, $app) {
109 109
             $loader->addPath($app['debug.templates_path'], 'Debug');
110 110
 
111 111
             return $loader;
112 112
         }));
113 113
 
114
-        $app['debug.templates_path'] = function () {
114
+        $app['debug.templates_path'] = function() {
115 115
             $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration');
116 116
 
117 117
             return dirname(dirname($r->getFileName())).'/Resources/views';
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
         // This code is here to lazy load the dump stack. This default
124 124
         // configuration for CLI mode is overridden in HTTP mode on
125 125
         // 'kernel.request' event
126
-        VarDumper::setHandler(function ($var) use ($app) {
126
+        VarDumper::setHandler(function($var) use ($app) {
127 127
             $dumper = $app['data_collector.dump'];
128 128
             $cloner = $app['var_dumper.cloner'];
129 129
 
130
-            $handler = function ($var) use ($dumper, $cloner) {
130
+            $handler = function($var) use ($dumper, $cloner) {
131 131
                 $dumper->dump($cloner->cloneVar($var));
132 132
             };
133 133
 
Please login to merge, or discard this patch.
src/Eccube/Controller/ShoppingController.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -1360,7 +1360,6 @@
 block discarded – undo
1360 1360
     /**
1361 1361
      * フォームの情報からお届け先のインデックスを返す
1362 1362
      *
1363
-     * @param Application $app
1364 1363
      * @param mixed $CustomerAddressData
1365 1364
      * @return int
1366 1365
      */
Please login to merge, or discard this patch.
src/Eccube/Repository/CustomerRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
             $qb
154 154
                 ->andWhere('c.id = :customer_id OR CONCAT(c.name01, c.name02) LIKE :name OR CONCAT(c.kana01, c.kana02) LIKE :kana OR c.email LIKE :email')
155 155
                 ->setParameter('customer_id', $id)
156
-                ->setParameter('name', '%' . $clean_key_multi . '%')
157
-                ->setParameter('kana', '%' . $clean_key_multi . '%')
158
-                ->setParameter('email', '%' . $clean_key_multi . '%');
156
+                ->setParameter('name', '%'.$clean_key_multi.'%')
157
+                ->setParameter('kana', '%'.$clean_key_multi.'%')
158
+                ->setParameter('email', '%'.$clean_key_multi.'%');
159 159
         }
160 160
 
161 161
         // Pref
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) {
206 206
             $qb
207 207
                 ->andWhere('CONCAT(c.tel01, c.tel02, c.tel03) LIKE :tel')
208
-                ->setParameter('tel', '%' . $searchData['tel'] . '%');
208
+                ->setParameter('tel', '%'.$searchData['tel'].'%');
209 209
         }
210 210
 
211 211
         // buy_total
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                 ->leftJoin('c.Orders', 'o')
300 300
                 ->leftJoin('o.OrderDetails', 'od')
301 301
                 ->andWhere('od.product_name LIKE :buy_product_name OR od.product_code LIKE :buy_product_name')
302
-                ->setParameter('buy_product_name', '%' . $searchData['buy_product_code'] . '%');
302
+                ->setParameter('buy_product_name', '%'.$searchData['buy_product_code'].'%');
303 303
         }
304 304
 
305 305
         // Order By
Please login to merge, or discard this patch.
src/Eccube/Command/GeneratorCommand/EntityFromDbGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
             $cmf->setEntityManager($em);
165 165
             $metadatas = $cmf->getAllMetadata();
166 166
 
167
-            $filters = array_map(function ($value) {
167
+            $filters = array_map(function($value) {
168 168
                 return ucfirst(Inflector::camelize(str_replace('plg_', '', $value)));
169 169
             }, $tableList);
170 170
             $metadatas = MetadataFilter::filter($metadatas, $filters);
Please login to merge, or discard this patch.
src/Eccube/Command/GeneratorCommand/generatortemplate/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $app->match('/plugin/[lower_code]/hello', 'Plugin\[code]\Controller\[code]Controller::index')->bind('plugin_[code]_hello');
34 34
 
35 35
         // Form
36
-        $app['form.types'] = $app->share($app->extend('form.types', function ($types) use ($app) {
36
+        $app['form.types'] = $app->share($app->extend('form.types', function($types) use ($app) {
37 37
             $types[] = new [code]ConfigType();
38 38
 
39 39
             return $types;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         // }
58 58
 
59 59
         // ログファイル設定
60
-        $app['monolog.logger.[lower_code]'] = $app->share(function ($app) {
60
+        $app['monolog.logger.[lower_code]'] = $app->share(function($app) {
61 61
 
62 62
             $logger = new $app['monolog.logger.class']('[lower_code]');
63 63
 
Please login to merge, or discard this patch.
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   +29 added lines, -29 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
             }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             'locale' => $this['config']['locale'],
218 218
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
219 219
         ));
220
-        $this['translator'] = $this->share($this->extend('translator', function ($translator, \Silex\Application $app) {
220
+        $this['translator'] = $this->share($this->extend('translator', function($translator, \Silex\Application $app) {
221 221
             $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader());
222 222
 
223 223
             $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml';
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
265 265
             'twig.form.templates' => array('Form/form_layout.twig'),
266 266
         ));
267
-        $this['twig'] = $this->share($this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
267
+        $this['twig'] = $this->share($this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
268 268
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
269 269
             $twig->addExtension(new \Twig_Extension_StringLoader());
270 270
 
271 271
             return $twig;
272 272
         }));
273 273
 
274
-        $this->before(function (Request $request, \Silex\Application $app) {
274
+        $this->before(function(Request $request, \Silex\Application $app) {
275 275
             $app['admin'] = false;
276 276
             $app['front'] = false;
277 277
             $pathinfo = rawurldecode($request->getPathInfo());
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             }
283 283
 
284 284
             // フロント or 管理画面ごとにtwigの探索パスを切り替える.
285
-            $app['twig'] = $app->share($app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
285
+            $app['twig'] = $app->share($app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
286 286
                 $paths = array();
287 287
 
288 288
                 // 互換性がないのでprofiler とproduction 時のcacheを分離する
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
         // twigのグローバル変数を定義.
331 331
         $app = $this;
332
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
332
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
333 333
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
334 334
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
335 335
             if (isset($app['twig_global_initialized']) && $app['twig_global_initialized'] === true) {
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
396 396
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
397 397
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
398
-                \Swift::init(function () {
398
+                \Swift::init(function() {
399 399
                     \Swift_DependencyContainer::getInstance()
400 400
                         ->register('mime.qpheaderencoder')
401 401
                         ->asAliasOf('mime.base64headerencoder');
@@ -575,19 +575,19 @@  discard block
 block discarded – undo
575 575
             array('^/mypage', 'ROLE_USER', $channel),
576 576
         );
577 577
 
578
-        $this['eccube.password_encoder'] = $this->share(function ($app) {
578
+        $this['eccube.password_encoder'] = $this->share(function($app) {
579 579
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
580 580
         });
581
-        $this['security.encoder_factory'] = $this->share(function ($app) {
581
+        $this['security.encoder_factory'] = $this->share(function($app) {
582 582
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
583 583
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
584 584
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
585 585
             ));
586 586
         });
587
-        $this['eccube.event_listner.security'] = $this->share(function ($app) {
587
+        $this['eccube.event_listner.security'] = $this->share(function($app) {
588 588
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
589 589
         });
590
-        $this['user'] = function ($app) {
590
+        $this['user'] = function($app) {
591 591
             $token = $app['security']->getToken();
592 592
 
593 593
             return ($token !== null) ? $token->getUser() : null;
@@ -598,17 +598,17 @@  discard block
 block discarded – undo
598 598
 
599 599
         // Voterの設定
600 600
         $app = $this;
601
-        $this['authority_voter'] = $this->share(function ($app) {
601
+        $this['authority_voter'] = $this->share(function($app) {
602 602
             return new \Eccube\Security\Voter\AuthorityVoter($app);
603 603
         });
604 604
 
605
-        $app['security.voters'] = $app->extend('security.voters', function ($voters) use ($app) {
605
+        $app['security.voters'] = $app->extend('security.voters', function($voters) use ($app) {
606 606
             $voters[] = $app['authority_voter'];
607 607
 
608 608
             return $voters;
609 609
         });
610 610
 
611
-        $this['security.access_manager'] = $this->share(function ($app) {
611
+        $this['security.access_manager'] = $this->share(function($app) {
612 612
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
613 613
         });
614 614
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
     {
622 622
         $config = $this['config'];
623 623
         if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) {
624
-            $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) {
624
+            $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) {
625 625
                 // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する
626 626
                 Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies']));
627 627
             }, self::EARLY_EVENT);
@@ -648,14 +648,14 @@  discard block
 block discarded – undo
648 648
     public function initPluginEventDispatcher()
649 649
     {
650 650
         // EventDispatcher
651
-        $this['eccube.event.dispatcher'] = $this->share(function () {
651
+        $this['eccube.event.dispatcher'] = $this->share(function() {
652 652
             return new EventDispatcher();
653 653
         });
654 654
 
655 655
         $app = $this;
656 656
 
657 657
         // hook point
658
-        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
658
+        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
659 659
             if (!$event->isMasterRequest()) {
660 660
                 return;
661 661
             }
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
664 664
         }, self::EARLY_EVENT);
665 665
 
666
-        $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
666
+        $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
667 667
             if (!$event->isMasterRequest()) {
668 668
                 return;
669 669
             }
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
673 673
         });
674 674
 
675
-        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
675
+        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
676 676
             if (!$event->isMasterRequest()) {
677 677
                 return;
678 678
             }
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
682 682
         });
683 683
 
684
-        $this->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
684
+        $this->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
685 685
             if (!$event->isMasterRequest()) {
686 686
                 return;
687 687
             }
@@ -689,13 +689,13 @@  discard block
 block discarded – undo
689 689
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
690 690
         }, self::LATE_EVENT);
691 691
 
692
-        $this->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) {
692
+        $this->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) {
693 693
             $route = $event->getRequest()->attributes->get('_route');
694 694
             $hookpoint = "eccube.event.controller.$route.finish";
695 695
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
696 696
         });
697 697
 
698
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
698
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
699 699
             if (!$event->isMasterRequest()) {
700 700
                 return;
701 701
             }
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
         });
705 705
 
706 706
         // Request Event
707
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
707
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
708 708
 
709 709
             if (!$event->isMasterRequest()) {
710 710
                 return;
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         }, 30); // Routing(32)が解決しし, 認証判定(8)が実行される前のタイミング.
736 736
 
737 737
         // Controller Event
738
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
738
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
739 739
 
740 740
             if (!$event->isMasterRequest()) {
741 741
                 return;
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
         });
766 766
 
767 767
         // Response Event
768
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
768
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
769 769
             if (!$event->isMasterRequest()) {
770 770
                 return;
771 771
             }
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         });
795 795
 
796 796
         // Exception Event
797
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
797
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
798 798
 
799 799
             if (!$event->isMasterRequest()) {
800 800
                 return;
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
         });
825 825
 
826 826
         // Terminate Event
827
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
827
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
828 828
 
829 829
             $route = $event->getRequest()->attributes->get('_route');
830 830
 
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 
896 896
             // const
897 897
             if (isset($config['const'])) {
898
-                $this['config'] = $this->share($this->extend('config', function ($eccubeConfig) use ($config) {
898
+                $this['config'] = $this->share($this->extend('config', function($eccubeConfig) use ($config) {
899 899
                     $eccubeConfig[$config['code']] = array(
900 900
                         'const' => $config['const'],
901 901
                     );
@@ -1098,7 +1098,7 @@  discard block
 block discarded – undo
1098 1098
         $app = $this;
1099 1099
 
1100 1100
         // Response Event(http cache対応、event実行は一番遅く設定)
1101
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1101
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1102 1102
 
1103 1103
             if (!$event->isMasterRequest()) {
1104 1104
                 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.
src/Eccube/Controller/Install/InstallController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -329,6 +329,9 @@
 block discarded – undo
329 329
         flush();
330 330
     }
331 331
 
332
+    /**
333
+     * @param InstallApplication $app
334
+     */
332 335
     private function checkModules($app)
333 336
     {
334 337
         foreach ($this->required_modules as $module) {
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function __construct()
58 58
     {
59
-        $this->config_path = __DIR__ . '/../../../../app/config/eccube';
60
-        $this->dist_path = __DIR__ . '/../../Resource/config';
61
-        $this->cache_path = __DIR__ . '/../../../../app/cache';
59
+        $this->config_path = __DIR__.'/../../../../app/config/eccube';
60
+        $this->dist_path = __DIR__.'/../../Resource/config';
61
+        $this->cache_path = __DIR__.'/../../../../app/cache';
62 62
     }
63 63
 
64 64
     private function isValid(Request $request, Form $form)
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         return $app['twig']->render('step1.twig', array(
110 110
                 'form' => $form->createView(),
111
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
111
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
112 112
         ));
113 113
     }
114 114
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         return $app['twig']->render('step2.twig', array(
133 133
                 'protectedDirs' => $protectedDirs,
134
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
134
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
135 135
         ));
136 136
     }
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         if (empty($sessionData['shop_name'])) {
147 147
 
148
-            $config_file = $this->config_path . '/config.yml';
148
+            $config_file = $this->config_path.'/config.yml';
149 149
             $fs = new Filesystem();
150 150
 
151 151
             if ($fs->exists($config_file)) {
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
                 }
160 160
 
161 161
                 // セキュリティの設定
162
-                $config_file = $this->config_path . '/path.yml';
162
+                $config_file = $this->config_path.'/path.yml';
163 163
                 $config = Yaml::parse(file_get_contents($config_file));
164 164
                 $sessionData['admin_dir'] = $config['admin_route'];
165 165
 
166
-                $config_file = $this->config_path . '/config.yml';
166
+                $config_file = $this->config_path.'/config.yml';
167 167
                 $config = Yaml::parse(file_get_contents($config_file));
168 168
 
169 169
                 $allowHost = $config['admin_allow_host'];
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
                 $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
174 174
 
175 175
                 // ロードバランサー、プロキシサーバ設定
176
-                $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only'];
176
+                $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only'];
177 177
                 $trustedProxies = $config['admin_allow_host'];
178 178
                 if (count($trustedProxies) > 0) {
179 179
                     $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", $trustedProxies));
180 180
                 }
181 181
 
182 182
                 // メール設定
183
-                $config_file = $this->config_path . '/mail.yml';
183
+                $config_file = $this->config_path.'/mail.yml';
184 184
                 $config = Yaml::parse(file_get_contents($config_file));
185 185
                 $mail = $config['mail'];
186 186
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
         return $app['twig']->render('step3.twig', array(
205 205
                 'form' => $form->createView(),
206
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
206
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
207 207
         ));
208 208
     }
209 209
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         if (empty($sessionData['database'])) {
220 220
 
221
-            $config_file = $this->config_path . '/database.yml';
221
+            $config_file = $this->config_path.'/database.yml';
222 222
             $fs = new Filesystem();
223 223
 
224 224
             if ($fs->exists($config_file)) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         return $app['twig']->render('step4.twig', array(
248 248
                 'form' => $form->createView(),
249
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
249
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
250 250
         ));
251 251
     }
252 252
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                 $host = $request->getSchemeAndHttpHost();
293 293
                 $basePath = $request->getBasePath();
294 294
                 $params = array(
295
-                    'http_url' => $host . $basePath,
295
+                    'http_url' => $host.$basePath,
296 296
                     'shop_name' => $sessionData['shop_name'],
297 297
                 );
298 298
 
@@ -307,16 +307,16 @@  discard block
 block discarded – undo
307 307
 
308 308
         return $app['twig']->render('step5.twig', array(
309 309
                 'form' => $form->createView(),
310
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
310
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
311 311
         ));
312 312
     }
313 313
 
314 314
     //    インストール完了
315 315
     public function complete(InstallApplication $app, Request $request)
316 316
     {
317
-        $config_yml = $this->config_path . '/config.yml';
317
+        $config_yml = $this->config_path.'/config.yml';
318 318
         $config = Yaml::parse(file_get_contents($config_yml));
319
-        $config_path = $this->config_path . '/path.yml';
319
+        $config_path = $this->config_path.'/path.yml';
320 320
         $path_yml = Yaml::parse(file_get_contents($config_path));
321 321
 
322 322
         $config = array_replace_recursive($path_yml, $config);
@@ -331,11 +331,11 @@  discard block
 block discarded – undo
331 331
         $host = $request->getSchemeAndHttpHost();
332 332
         $basePath = $request->getBasePath();
333 333
 
334
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
334
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
335 335
 
336 336
         return $app['twig']->render('complete.twig', array(
337 337
                 'admin_url' => $adminUrl,
338
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
338
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
339 339
         ));
340 340
     }
341 341
 
@@ -351,12 +351,12 @@  discard block
 block discarded – undo
351 351
     {
352 352
         foreach ($this->required_modules as $module) {
353 353
             if (!extension_loaded($module)) {
354
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
354
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
355 355
             }
356 356
         }
357 357
 
358 358
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
359
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
359
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
360 360
         }
361 361
 
362 362
         foreach ($this->recommended_module as $module) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             if (!function_exists('apache_get_modules')) {
385 385
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
386 386
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
387
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
387
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
388 388
             }
389 389
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
390 390
             // iis
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 
396 396
     private function setPDO()
397 397
     {
398
-        $config_file = $this->config_path . '/database.yml';
398
+        $config_file = $this->config_path.'/database.yml';
399 399
         $config = Yaml::parse(file_get_contents($config_file));
400 400
 
401 401
         try {
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
      */
430 430
     private function getEntityManager()
431 431
     {
432
-        $config_file = $this->config_path . '/database.yml';
432
+        $config_file = $this->config_path.'/database.yml';
433 433
         $database = Yaml::parse(file_get_contents($config_file));
434 434
 
435 435
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -437,15 +437,15 @@  discard block
 block discarded – undo
437 437
         ));
438 438
 
439 439
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
440
-            'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
440
+            'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
441 441
             'orm.em.options' => array(
442 442
                 'mappings' => array(
443 443
                     array(
444 444
                         'type' => 'yml',
445 445
                         'namespace' => 'Eccube\Entity',
446 446
                         'path' => array(
447
-                            __DIR__ . '/../../Resource/doctrine',
448
-                            __DIR__ . '/../../Resource/doctrine/master',
447
+                            __DIR__.'/../../Resource/doctrine',
448
+                            __DIR__.'/../../Resource/doctrine/master',
449 449
                         ),
450 450
                     ),
451 451
                 ),
@@ -472,11 +472,11 @@  discard block
 block discarded – undo
472 472
     {
473 473
         $this->resetNatTimer();
474 474
 
475
-        $config_file = $this->config_path . '/database.yml';
475
+        $config_file = $this->config_path.'/database.yml';
476 476
         $database = Yaml::parse(file_get_contents($config_file));
477 477
         $config['database'] = $database['database'];
478 478
 
479
-        $config_file = $this->config_path . '/config.yml';
479
+        $config_file = $this->config_path.'/config.yml';
480 480
         $baseConfig = Yaml::parse(file_get_contents($config_file));
481 481
         $config['config'] = $baseConfig;
482 482
 
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
     {
533 533
         $this->resetNatTimer();
534 534
 
535
-        $config_file = $this->config_path . '/database.yml';
535
+        $config_file = $this->config_path.'/database.yml';
536 536
         $database = Yaml::parse(file_get_contents($config_file));
537 537
         $config['database'] = $database['database'];
538 538
 
539
-        $config_file = $this->config_path . '/config.yml';
539
+        $config_file = $this->config_path.'/config.yml';
540 540
         $baseConfig = Yaml::parse(file_get_contents($config_file));
541 541
         $config['config'] = $baseConfig;
542 542
 
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
         $config = new Configuration($app['db']);
600 600
         $config->setMigrationsNamespace('DoctrineMigrations');
601 601
 
602
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
602
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
603 603
         $config->setMigrationsDirectory($migrationDir);
604 604
         $config->registerMigrationsFromDirectory($migrationDir);
605 605
 
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
     private function getProtectedDirs()
632 632
     {
633 633
         $protectedDirs = array();
634
-        $base = __DIR__ . '/../../../..';
634
+        $base = __DIR__.'/../../../..';
635 635
         $dirs = array(
636 636
             '/html',
637 637
             '/app',
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
         );
645 645
 
646 646
         foreach ($dirs as $dir) {
647
-            if (!is_writable($base . $dir)) {
647
+            if (!is_writable($base.$dir)) {
648 648
                 $protectedDirs[] = $dir;
649 649
             }
650 650
         }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     private function createConfigYamlFile($data, $auth = true)
656 656
     {
657 657
         $fs = new Filesystem();
658
-        $config_file = $this->config_path . '/config.yml';
658
+        $config_file = $this->config_path.'/config.yml';
659 659
 
660 660
         if ($fs->exists($config_file)) {
661 661
             $config = Yaml::parse(file_get_contents($config_file));
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 
697 697
         $fs = new Filesystem();
698 698
         $content = str_replace(
699
-            $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist')
699
+            $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist')
700 700
         );
701 701
         $fs->dumpFile($config_file, $content);
702 702
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
 
712 712
     private function addInstallStatus()
713 713
     {
714
-        $config_file = $this->config_path . '/config.yml';
714
+        $config_file = $this->config_path.'/config.yml';
715 715
         $config = Yaml::parse(file_get_contents($config_file));
716 716
         $config['eccube_install'] = 1;
717 717
         $yml = Yaml::dump($config);
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
     private function createDatabaseYamlFile($data)
724 724
     {
725 725
         $fs = new Filesystem();
726
-        $config_file = $this->config_path . '/database.yml';
726
+        $config_file = $this->config_path.'/database.yml';
727 727
         if ($fs->exists($config_file)) {
728 728
             $fs->remove($config_file);
729 729
         }
@@ -756,14 +756,14 @@  discard block
 block discarded – undo
756 756
 
757 757
             $fs = new Filesystem();
758 758
             $content = str_replace(
759
-                $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist')
759
+                $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist')
760 760
             );
761 761
         } else {
762 762
             $content = Yaml::dump(
763 763
                     array(
764 764
                         'database' => array(
765 765
                             'driver' => 'pdo_sqlite',
766
-                            'path' => realpath($this->config_path . '/eccube.db')
766
+                            'path' => realpath($this->config_path.'/eccube.db')
767 767
                         )
768 768
                     )
769 769
             );
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     private function createMailYamlFile($data)
777 777
     {
778 778
         $fs = new Filesystem();
779
-        $config_file = $this->config_path . '/mail.yml';
779
+        $config_file = $this->config_path.'/mail.yml';
780 780
         if ($fs->exists($config_file)) {
781 781
             $fs->remove($config_file);
782 782
         }
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 
792 792
         $fs = new Filesystem();
793 793
         $content = str_replace(
794
-            $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist')
794
+            $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist')
795 795
         );
796 796
         $fs->dumpFile($config_file, $content);
797 797
 
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
     private function createPathYamlFile($data, Request $request)
802 802
     {
803 803
         $fs = new Filesystem();
804
-        $config_file = $this->config_path . '/path.yml';
804
+        $config_file = $this->config_path.'/path.yml';
805 805
         if ($fs->exists($config_file)) {
806 806
             $fs->remove($config_file);
807 807
         }
@@ -809,16 +809,16 @@  discard block
 block discarded – undo
809 809
         $ADMIN_ROUTE = $data['admin_dir'];
810 810
         $TEMPLATE_CODE = 'default';
811 811
         $USER_DATA_ROUTE = 'user_data';
812
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
812
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
813 813
         $ROOT_URLPATH = $request->getBasePath();
814
-        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH;
814
+        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH;
815 815
 
816 816
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}');
817 817
         $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH);
818 818
 
819 819
         $fs = new Filesystem();
820 820
         $content = str_replace(
821
-            $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist')
821
+            $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist')
822 822
         );
823 823
         $fs->dumpFile($config_file, $content);
824 824
 
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
 
828 828
     private function sendAppData($params)
829 829
     {
830
-        $config_file = $this->config_path . '/database.yml';
830
+        $config_file = $this->config_path.'/database.yml';
831 831
         $db_config = Yaml::parse(file_get_contents($config_file));
832 832
 
833 833
         $this->setPDO();
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
         }
840 840
 
841 841
         if ($db_config['database']['driver'] === 'pdo_mysql') {
842
-            $db_ver = 'MySQL:' . $version;
842
+            $db_ver = 'MySQL:'.$version;
843 843
         } else {
844 844
             $db_ver = $version;
845 845
         }
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 
858 858
         $header = array(
859 859
             'Content-Type: application/x-www-form-urlencoded',
860
-            'Content-Length: ' . strlen($data),
860
+            'Content-Length: '.strlen($data),
861 861
         );
862 862
         $context = stream_context_create(
863 863
             array(
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
     public function migration(InstallApplication $app, Request $request)
885 885
     {
886 886
         return $app['twig']->render('migration.twig', array(
887
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
887
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
888 888
         ));
889 889
     }
890 890
 
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
             return $app['twig']->render('migration_plugin.twig', array(
914 914
                     'Plugins' => $Plugins,
915 915
                     'version' => Constant::VERSION,
916
-                    'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
916
+                    'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
917 917
             ));
918 918
         }
919 919
     }
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
         \Eccube\Util\Cache::clear($config_app, true);
937 937
 
938 938
         return $app['twig']->render('migration_end.twig', array(
939
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
939
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
940 940
         ));
941 941
     }
942 942
 }
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.