Failed Conditions
Pull Request — master (#1392)
by Kentaro
15:31
created
src/Eccube/Form/Type/Admin/OrderType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                     '\Eccube\Entity\Customer'
235 235
                 )));
236 236
 
237
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) {
237
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) {
238 238
 
239 239
             if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
240 240
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             }
275 275
 
276 276
         });
277
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
277
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
278 278
             $form = $event->getForm();
279 279
             $orderDetails = $form['OrderDetails']->getData();
280 280
             if (empty($orderDetails) || count($orderDetails) < 1) {
Please login to merge, or discard this patch.
src/Eccube/Event/FormEventSubscriber.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,18 +36,18 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $events = array();
38 38
         // YamlでParseしてがんばる
39
-        $basePath = __DIR__ . '/../../../app/Plugin';
39
+        $basePath = __DIR__.'/../../../app/Plugin';
40 40
         $finder = Finder::create()
41 41
             ->in($basePath)
42 42
             ->directories()
43 43
             ->depth(0);
44 44
 
45 45
         foreach ($finder as $dir) {
46
-            $config = Yaml::parse(file_get_contents($dir->getRealPath() . '/config.yml'));
46
+            $config = Yaml::parse(file_get_contents($dir->getRealPath().'/config.yml'));
47 47
 
48 48
             if (isset($config['form'])) {
49 49
                 foreach ($config['form'] as $event => $class) {
50
-                    $events[$event][] = '\\Plugin\\' . $config['code'] . '\\' . $class;
50
+                    $events[$event][] = '\\Plugin\\'.$config['code'].'\\'.$class;
51 51
                 }
52 52
             }
53 53
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $events = self::getEvents();
72 72
 
73 73
         if (isset($events['onPreSetData'])) {
74
-            foreach($events['onPreSetData'] as $formEventClass) {
74
+            foreach ($events['onPreSetData'] as $formEventClass) {
75 75
                 $formEvent = new $formEventClass();
76 76
                 $formEvent->onPreSetData($event);
77 77
             }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $events = self::getEvents();
84 84
 
85 85
         if (isset($events['onPostSetData'])) {
86
-            foreach($events['onPostSetData'] as $formEventClass) {
86
+            foreach ($events['onPostSetData'] as $formEventClass) {
87 87
                 $formEvent = new $formEventClass();
88 88
                 $formEvent->onPostSetData($event);
89 89
             }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $events = self::getEvents();
96 96
 
97 97
         if (isset($events['onPreSubmit'])) {
98
-            foreach($events['onPreSubmit'] as $formEventClass) {
98
+            foreach ($events['onPreSubmit'] as $formEventClass) {
99 99
                 $formEvent = new $formEventClass();
100 100
                 $formEvent->onPreSubmit($event);
101 101
             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $events = self::getEvents();
108 108
 
109 109
         if (isset($events['onSubmit'])) {
110
-            foreach($events['onSubmit'] as $formEventClass) {
110
+            foreach ($events['onSubmit'] as $formEventClass) {
111 111
                 $formEvent = new $formEventClass();
112 112
                 $formEvent->onSubmit($event);
113 113
             }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $events = self::getEvents();
120 120
 
121 121
         if (isset($events['onPostSubmit'])) {
122
-            foreach($events['onPostSubmit'] as $formEventClass) {
122
+            foreach ($events['onPostSubmit'] as $formEventClass) {
123 123
                 $formEvent = new $formEventClass();
124 124
                 $formEvent->onPostSubmit($event);
125 125
             }
Please login to merge, or discard this patch.
src/Eccube/Controller/Install/InstallController.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function __construct()
62 62
     {
63
-        $this->config_path = __DIR__ . '/../../../../app/config/eccube';
64
-        $this->dist_path = __DIR__ . '/../../Resource/config';
65
-        $this->cache_path = __DIR__ . '/../../../../app/cache';
63
+        $this->config_path = __DIR__.'/../../../../app/config/eccube';
64
+        $this->dist_path = __DIR__.'/../../Resource/config';
65
+        $this->cache_path = __DIR__.'/../../../../app/cache';
66 66
     }
67 67
 
68 68
     private function isValid(Request $request, Form $form)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         if (empty($sessionData['shop_name'])) {
149 149
 
150
-            $config_file = $this->config_path . '/config.yml';
150
+            $config_file = $this->config_path.'/config.yml';
151 151
             $fs = new Filesystem();
152 152
 
153 153
             if ($fs->exists($config_file)) {
@@ -161,21 +161,21 @@  discard block
 block discarded – undo
161 161
                 }
162 162
 
163 163
                 // セキュリティの設定
164
-                $config_file = $this->config_path . '/path.yml';
164
+                $config_file = $this->config_path.'/path.yml';
165 165
                 $config = Yaml::parse(file_get_contents($config_file));
166 166
                 $sessionData['admin_dir'] = $config['admin_route'];
167 167
 
168
-                $config_file = $this->config_path . '/config.yml';
168
+                $config_file = $this->config_path.'/config.yml';
169 169
                 $config = Yaml::parse(file_get_contents($config_file));
170 170
 
171 171
                 $allowHost = $config['admin_allow_host'];
172 172
                 if (count($allowHost) > 0) {
173 173
                     $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost));
174 174
                 }
175
-                $sessionData['admin_force_ssl'] = (bool)$config['force_ssl'];
175
+                $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
176 176
 
177 177
                 // メール設定
178
-                $config_file = $this->config_path . '/mail.yml';
178
+                $config_file = $this->config_path.'/mail.yml';
179 179
                 $config = Yaml::parse(file_get_contents($config_file));
180 180
                 $mail = $config['mail'];
181 181
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         if (empty($sessionData['database'])) {
214 214
 
215
-            $config_file = $this->config_path . '/database.yml';
215
+            $config_file = $this->config_path.'/database.yml';
216 216
             $fs = new Filesystem();
217 217
 
218 218
             if ($fs->exists($config_file)) {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
                 $host = $request->getSchemeAndHttpHost();
286 286
                 $basePath = $request->getBasePath();
287 287
                 $params = array(
288
-                    'http_url' => $host . $basePath,
288
+                    'http_url' => $host.$basePath,
289 289
                     'shop_name' => $sessionData['shop_name'],
290 290
                 );
291 291
 
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
     //    インストール完了
307 307
     public function complete(InstallApplication $app, Request $request)
308 308
     {
309
-        $config_file = $this->config_path . '/path.yml';
309
+        $config_file = $this->config_path.'/path.yml';
310 310
         $config = Yaml::parse(file_get_contents($config_file));
311 311
 
312 312
         $host = $request->getSchemeAndHttpHost();
313 313
         $basePath = $request->getBasePath();
314 314
 
315
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
315
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
316 316
 
317 317
         return $app['twig']->render('complete.twig', array(
318 318
             'admin_url' => $adminUrl,
@@ -332,17 +332,17 @@  discard block
 block discarded – undo
332 332
     {
333 333
         foreach ($this->required_modules as $module) {
334 334
             if (!extension_loaded($module)) {
335
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
335
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
336 336
             }
337 337
         }
338 338
 
339 339
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
340
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
340
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
341 341
         }
342 342
 
343 343
         foreach ($this->recommended_module as $module) {
344 344
             if (!extension_loaded($module)) {
345
-                $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
345
+                $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install');
346 346
             }
347 347
         }
348 348
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
             if (!function_exists('apache_get_modules')) {
361 361
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
362 362
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
363
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
363
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
364 364
             }
365 365
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
366 366
             // iis
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
     private function setPDO()
373 373
     {
374
-        $config_file = $this->config_path . '/database.yml';
374
+        $config_file = $this->config_path.'/database.yml';
375 375
         $config = Yaml::parse(file_get_contents($config_file));
376 376
 
377 377
         try {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     private function getEntityManager()
408 408
     {
409
-        $config_file = $this->config_path . '/database.yml';
409
+        $config_file = $this->config_path.'/database.yml';
410 410
         $database = Yaml::parse(file_get_contents($config_file));
411 411
 
412 412
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -414,15 +414,15 @@  discard block
 block discarded – undo
414 414
         ));
415 415
 
416 416
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
417
-            'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
417
+            'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
418 418
             'orm.em.options' => array(
419 419
                 'mappings' => array(
420 420
                     array(
421 421
                         'type' => 'yml',
422 422
                         'namespace' => 'Eccube\Entity',
423 423
                         'path' => array(
424
-                            __DIR__ . '/../../Resource/doctrine',
425
-                            __DIR__ . '/../../Resource/doctrine/master',
424
+                            __DIR__.'/../../Resource/doctrine',
425
+                            __DIR__.'/../../Resource/doctrine/master',
426 426
                         ),
427 427
                     ),
428 428
 
@@ -450,11 +450,11 @@  discard block
 block discarded – undo
450 450
     {
451 451
         $this->resetNatTimer();
452 452
 
453
-        $config_file = $this->config_path . '/database.yml';
453
+        $config_file = $this->config_path.'/database.yml';
454 454
         $database = Yaml::parse(file_get_contents($config_file));
455 455
         $config['database'] = $database['database'];
456 456
 
457
-        $config_file = $this->config_path . '/config.yml';
457
+        $config_file = $this->config_path.'/config.yml';
458 458
         $baseConfig = Yaml::parse(file_get_contents($config_file));
459 459
         $config['config'] = $baseConfig;
460 460
 
@@ -510,11 +510,11 @@  discard block
 block discarded – undo
510 510
     {
511 511
         $this->resetNatTimer();
512 512
 
513
-        $config_file = $this->config_path . '/database.yml';
513
+        $config_file = $this->config_path.'/database.yml';
514 514
         $database = Yaml::parse(file_get_contents($config_file));
515 515
         $config['database'] = $database['database'];
516 516
 
517
-        $config_file = $this->config_path . '/config.yml';
517
+        $config_file = $this->config_path.'/config.yml';
518 518
         $baseConfig = Yaml::parse(file_get_contents($config_file));
519 519
         $config['config'] = $baseConfig;
520 520
 
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
         $config = new Configuration($app['db']);
578 578
         $config->setMigrationsNamespace('DoctrineMigrations');
579 579
 
580
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
580
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
581 581
         $config->setMigrationsDirectory($migrationDir);
582 582
         $config->registerMigrationsFromDirectory($migrationDir);
583 583
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
     private function getProtectedDirs()
606 606
     {
607 607
         $protectedDirs = array();
608
-        $base = __DIR__ . '/../../../..';
608
+        $base = __DIR__.'/../../../..';
609 609
         $dirs = array(
610 610
             '/html',
611 611
             '/app',
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         );
619 619
 
620 620
         foreach ($dirs as $dir) {
621
-            if (!is_writable($base . $dir)) {
621
+            if (!is_writable($base.$dir)) {
622 622
                 $protectedDirs[] = $dir;
623 623
             }
624 624
         }
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
     private function createConfigYamlFile($data, $auth = true)
630 630
     {
631 631
         $fs = new Filesystem();
632
-        $config_file = $this->config_path . '/config.yml';
632
+        $config_file = $this->config_path.'/config.yml';
633 633
 
634 634
         if ($fs->exists($config_file)) {
635 635
             $config = Yaml::parse(file_get_contents($config_file));
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
         $content = str_replace(
661 661
             $target,
662 662
             $replace,
663
-            file_get_contents($this->dist_path . '/config.yml.dist')
663
+            file_get_contents($this->dist_path.'/config.yml.dist')
664 664
         );
665 665
         $fs->dumpFile($config_file, $content);
666 666
 
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 
675 675
     private function addInstallStatus()
676 676
     {
677
-        $config_file = $this->config_path . '/config.yml';
677
+        $config_file = $this->config_path.'/config.yml';
678 678
         $config = Yaml::parse(file_get_contents($config_file));
679 679
         $config['eccube_install'] = 1;
680 680
         $yml = Yaml::dump($config);
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
     private function createDatabaseYamlFile($data)
687 687
     {
688 688
         $fs = new Filesystem();
689
-        $config_file = $this->config_path . '/database.yml';
689
+        $config_file = $this->config_path.'/database.yml';
690 690
         if ($fs->exists($config_file)) {
691 691
             $fs->remove($config_file);
692 692
         }
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
         $content = str_replace(
720 720
             $target,
721 721
             $replace,
722
-            file_get_contents($this->dist_path . '/database.yml.dist')
722
+            file_get_contents($this->dist_path.'/database.yml.dist')
723 723
         );
724 724
 
725 725
         $fs->dumpFile($config_file, $content);
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
     private function createMailYamlFile($data)
731 731
     {
732 732
         $fs = new Filesystem();
733
-        $config_file = $this->config_path . '/mail.yml';
733
+        $config_file = $this->config_path.'/mail.yml';
734 734
         if ($fs->exists($config_file)) {
735 735
             $fs->remove($config_file);
736 736
         }
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
         $content = str_replace(
748 748
             $target,
749 749
             $replace,
750
-            file_get_contents($this->dist_path . '/mail.yml.dist')
750
+            file_get_contents($this->dist_path.'/mail.yml.dist')
751 751
         );
752 752
         $fs->dumpFile($config_file, $content);
753 753
 
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
     private function createPathYamlFile($data, Request $request)
758 758
     {
759 759
         $fs = new Filesystem();
760
-        $config_file = $this->config_path . '/path.yml';
760
+        $config_file = $this->config_path.'/path.yml';
761 761
         if ($fs->exists($config_file)) {
762 762
             $fs->remove($config_file);
763 763
         }
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
         $ADMIN_ROUTE = $data['admin_dir'];
766 766
         $TEMPLATE_CODE = 'default';
767 767
         $USER_DATA_ROUTE = 'user_data';
768
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
768
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
769 769
         $ROOT_URLPATH = $request->getBasePath();
770 770
 
771 771
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}');
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         $content = str_replace(
776 776
             $target,
777 777
             $replace,
778
-            file_get_contents($this->dist_path . '/path.yml.dist')
778
+            file_get_contents($this->dist_path.'/path.yml.dist')
779 779
         );
780 780
         $fs->dumpFile($config_file, $content);
781 781
 
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 
785 785
     private function sendAppData($params)
786 786
     {
787
-        $config_file = $this->config_path . '/database.yml';
787
+        $config_file = $this->config_path.'/database.yml';
788 788
         $db_config = Yaml::parse(file_get_contents($config_file));
789 789
 
790 790
         $this->setPDO();
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
         }
797 797
 
798 798
         if ($db_config['database']['driver'] === 'pdo_mysql') {
799
-            $db_ver = 'MySQL:' . $version;
799
+            $db_ver = 'MySQL:'.$version;
800 800
         } else {
801 801
             $db_ver = $version;
802 802
         }
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 
815 815
         $header = array(
816 816
             'Content-Type: application/x-www-form-urlencoded',
817
-            'Content-Length: ' . strlen($data),
817
+            'Content-Length: '.strlen($data),
818 818
         );
819 819
         $context = stream_context_create(
820 820
             array(
Please login to merge, or discard this patch.
src/Eccube/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
     public function initSession()
271 271
     {
272 272
         $this->register(new \Silex\Provider\SessionServiceProvider(), array(
273
-            'session.storage.save_path' => $this['config']['root_dir'] . '/app/cache/eccube/session',
273
+            'session.storage.save_path' => $this['config']['root_dir'].'/app/cache/eccube/session',
274 274
             'session.storage.options' => array(
275 275
                 'name' => 'eccube',
276 276
                 'cookie_path' => $this['config']['root_urlpath'] ?: '/',
Please login to merge, or discard this patch.