Failed Conditions
Pull Request — master (#1543)
by Tsuyoshi
489:47 queued 481:38
created
src/Eccube/Controller/Install/InstallController.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $this->app = $app;
62 62
 
63
-        $this->config_path = $this->app->rootDir . '/app/config/eccube';
64
-        $this->dist_path = __DIR__ . '/../../Resource/config';
65
-        $this->cache_path = $this->app->rootDir . '/app/cache';
63
+        $this->config_path = $this->app->rootDir.'/app/config/eccube';
64
+        $this->dist_path = __DIR__.'/../../Resource/config';
65
+        $this->cache_path = $this->app->rootDir.'/app/cache';
66 66
     }
67 67
 
68 68
     /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
         if (empty($sessionData['shop_name'])) {
155 155
 
156
-            $config_file = $this->config_path . '/config.yml';
156
+            $config_file = $this->config_path.'/config.yml';
157 157
             $fs = new Filesystem();
158 158
 
159 159
             if ($fs->exists($config_file)) {
@@ -167,21 +167,21 @@  discard block
 block discarded – undo
167 167
                 }
168 168
 
169 169
                 // セキュリティの設定
170
-                $config_file = $this->config_path . '/path.yml';
170
+                $config_file = $this->config_path.'/path.yml';
171 171
                 $config = Yaml::parse(file_get_contents($config_file));
172 172
                 $sessionData['admin_dir'] = $config['admin_route'];
173 173
 
174
-                $config_file = $this->config_path . '/config.yml';
174
+                $config_file = $this->config_path.'/config.yml';
175 175
                 $config = Yaml::parse(file_get_contents($config_file));
176 176
 
177 177
                 $allowHost = $config['admin_allow_host'];
178 178
                 if (count($allowHost) > 0) {
179 179
                     $sessionData['admin_allow_hosts'] = Str::convertLineFeed(implode("\n", $allowHost));
180 180
                 }
181
-                $sessionData['admin_force_ssl'] = (bool)$config['force_ssl'];
181
+                $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
182 182
 
183 183
                 // メール設定
184
-                $config_file = $this->config_path . '/mail.yml';
184
+                $config_file = $this->config_path.'/mail.yml';
185 185
                 $config = Yaml::parse(file_get_contents($config_file));
186 186
                 $mail = $config['mail'];
187 187
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                 $host = $request->getSchemeAndHttpHost();
305 305
                 $basePath = $request->getBasePath();
306 306
                 $params = array(
307
-                    'http_url' => $host . $basePath,
307
+                    'http_url' => $host.$basePath,
308 308
                     'shop_name' => $sessionData['shop_name'],
309 309
                 );
310 310
 
@@ -332,13 +332,13 @@  discard block
 block discarded – undo
332 332
     {
333 333
         $this->setup($app);
334 334
 
335
-        $config_file = $this->config_path . '/path.yml';
335
+        $config_file = $this->config_path.'/path.yml';
336 336
         $config = Yaml::parse(file_get_contents($config_file));
337 337
 
338 338
         $host = $request->getSchemeAndHttpHost();
339 339
         $basePath = $request->getBasePath();
340 340
 
341
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
341
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
342 342
 
343 343
         return $app['twig']->render('complete.twig', array(
344 344
             'admin_url' => $adminUrl,
@@ -443,17 +443,17 @@  discard block
 block discarded – undo
443 443
     {
444 444
         foreach ($this->required_modules as $module) {
445 445
             if (!extension_loaded($module)) {
446
-                $this->app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
446
+                $this->app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
447 447
             }
448 448
         }
449 449
 
450 450
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
451
-            $this->app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
451
+            $this->app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
452 452
         }
453 453
 
454 454
         foreach ($this->recommended_module as $module) {
455 455
             if (!extension_loaded($module)) {
456
-                $this->app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
456
+                $this->app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install');
457 457
             }
458 458
         }
459 459
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             if (!function_exists('apache_get_modules')) {
472 472
                 $this->app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
473 473
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
474
-                $this->app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
474
+                $this->app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
475 475
             }
476 476
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
477 477
             // iis
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 
483 483
     private function setPDO()
484 484
     {
485
-        $config_file = $this->config_path . '/database.yml';
485
+        $config_file = $this->config_path.'/database.yml';
486 486
         $config = Yaml::parse(file_get_contents($config_file));
487 487
 
488 488
         try {
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
      */
518 518
     private function getEntityManager()
519 519
     {
520
-        $config_file = $this->config_path . '/database.yml';
520
+        $config_file = $this->config_path.'/database.yml';
521 521
         $database = Yaml::parse(file_get_contents($config_file));
522 522
 
523 523
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -525,15 +525,15 @@  discard block
 block discarded – undo
525 525
         ));
526 526
 
527 527
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
528
-            'orm.proxies_dir' => $this->app->rootDir . '/app/cache/doctrine',
528
+            'orm.proxies_dir' => $this->app->rootDir.'/app/cache/doctrine',
529 529
             'orm.em.options' => array(
530 530
                 'mappings' => array(
531 531
                     array(
532 532
                         'type' => 'yml',
533 533
                         'namespace' => 'Eccube\Entity',
534 534
                         'path' => array(
535
-                            __DIR__ . '/../../Resource/doctrine',
536
-                            __DIR__ . '/../../Resource/doctrine/master',
535
+                            __DIR__.'/../../Resource/doctrine',
536
+                            __DIR__.'/../../Resource/doctrine/master',
537 537
                         ),
538 538
                     ),
539 539
 
@@ -561,11 +561,11 @@  discard block
 block discarded – undo
561 561
     {
562 562
         $this->resetNatTimer();
563 563
 
564
-        $config_file = $this->config_path . '/database.yml';
564
+        $config_file = $this->config_path.'/database.yml';
565 565
         $database = Yaml::parse(file_get_contents($config_file));
566 566
         $config['database'] = $database['database'];
567 567
 
568
-        $config_file = $this->config_path . '/config.yml';
568
+        $config_file = $this->config_path.'/config.yml';
569 569
         $baseConfig = Yaml::parse(file_get_contents($config_file));
570 570
         $config['config'] = $baseConfig;
571 571
 
@@ -621,11 +621,11 @@  discard block
 block discarded – undo
621 621
     {
622 622
         $this->resetNatTimer();
623 623
 
624
-        $config_file = $this->config_path . '/database.yml';
624
+        $config_file = $this->config_path.'/database.yml';
625 625
         $database = Yaml::parse(file_get_contents($config_file));
626 626
         $config['database'] = $database['database'];
627 627
 
628
-        $config_file = $this->config_path . '/config.yml';
628
+        $config_file = $this->config_path.'/config.yml';
629 629
         $baseConfig = Yaml::parse(file_get_contents($config_file));
630 630
         $config['config'] = $baseConfig;
631 631
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
         $config = new Configuration($eccube['db']);
690 690
         $config->setMigrationsNamespace('DoctrineMigrations');
691 691
 
692
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
692
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
693 693
         $config->setMigrationsDirectory($migrationDir);
694 694
         $config->registerMigrationsFromDirectory($migrationDir);
695 695
 
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
         );
734 734
 
735 735
         foreach ($dirs as $dir) {
736
-            if (!is_writable($base . $dir)) {
736
+            if (!is_writable($base.$dir)) {
737 737
                 $protectedDirs[] = $dir;
738 738
             }
739 739
         }
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
     private function createConfigYamlFile($data, $auth = true)
745 745
     {
746 746
         $fs = new Filesystem();
747
-        $config_file = $this->config_path . '/config.yml';
747
+        $config_file = $this->config_path.'/config.yml';
748 748
 
749 749
         if ($fs->exists($config_file)) {
750 750
             $config = Yaml::parse(file_get_contents($config_file));
@@ -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 . '/config.yml.dist')
778
+            file_get_contents($this->dist_path.'/config.yml.dist')
779 779
         );
780 780
         $fs->dumpFile($config_file, $content);
781 781
 
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 
790 790
     private function addInstallStatus()
791 791
     {
792
-        $config_file = $this->config_path . '/config.yml';
792
+        $config_file = $this->config_path.'/config.yml';
793 793
         $config = Yaml::parse(file_get_contents($config_file));
794 794
         $config['eccube_install'] = 1;
795 795
         $yml = Yaml::dump($config);
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
     private function createDatabaseYamlFile($data)
802 802
     {
803 803
         $fs = new Filesystem();
804
-        $config_file = $this->config_path . '/database.yml';
804
+        $config_file = $this->config_path.'/database.yml';
805 805
         if ($fs->exists($config_file)) {
806 806
             $fs->remove($config_file);
807 807
         }
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
             $content = str_replace(
836 836
                 $target,
837 837
                 $replace,
838
-                file_get_contents($this->dist_path . '/database.yml.dist')
838
+                file_get_contents($this->dist_path.'/database.yml.dist')
839 839
             );
840 840
 
841 841
         } else {
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
     private function createMailYamlFile($data)
857 857
     {
858 858
         $fs = new Filesystem();
859
-        $config_file = $this->config_path . '/mail.yml';
859
+        $config_file = $this->config_path.'/mail.yml';
860 860
         if ($fs->exists($config_file)) {
861 861
             $fs->remove($config_file);
862 862
         }
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
         $content = str_replace(
874 874
             $target,
875 875
             $replace,
876
-            file_get_contents($this->dist_path . '/mail.yml.dist')
876
+            file_get_contents($this->dist_path.'/mail.yml.dist')
877 877
         );
878 878
         $fs->dumpFile($config_file, $content);
879 879
 
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
     private function createPathYamlFile($data, Request $request)
884 884
     {
885 885
         $fs = new Filesystem();
886
-        $config_file = $this->config_path . '/path.yml';
886
+        $config_file = $this->config_path.'/path.yml';
887 887
         if ($fs->exists($config_file)) {
888 888
             $fs->remove($config_file);
889 889
         }
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
         $content = str_replace(
902 902
             $target,
903 903
             $replace,
904
-            file_get_contents($this->dist_path . '/path.yml.dist')
904
+            file_get_contents($this->dist_path.'/path.yml.dist')
905 905
         );
906 906
         $fs->dumpFile($config_file, $content);
907 907
 
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
 
911 911
     private function sendAppData($params)
912 912
     {
913
-        $config_file = $this->config_path . '/database.yml';
913
+        $config_file = $this->config_path.'/database.yml';
914 914
         $db_config = Yaml::parse(file_get_contents($config_file));
915 915
 
916 916
         $this->setPDO();
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
         }
923 923
 
924 924
         if ($db_config['database']['driver'] === 'pdo_mysql') {
925
-            $db_ver = 'MySQL:' . $version;
925
+            $db_ver = 'MySQL:'.$version;
926 926
         } else {
927 927
             $db_ver = $version;
928 928
         }
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
 
941 941
         $header = array(
942 942
             'Content-Type: application/x-www-form-urlencoded',
943
-            'Content-Length: ' . strlen($data),
943
+            'Content-Length: '.strlen($data),
944 944
         );
945 945
         $context = stream_context_create(
946 946
             array(
Please login to merge, or discard this patch.
src/Eccube/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,8 +95,8 @@
 block discarded – undo
95 95
         // load config
96 96
         $app = $this;
97 97
         $this['config'] = $this->share(function() use ($app) {
98
-            $ymlPath =  $app->rootDir.'/app/config/eccube';
99
-            $distPath =  __DIR__.'/Resource/config';
98
+            $ymlPath = $app->rootDir.'/app/config/eccube';
99
+            $distPath = __DIR__.'/Resource/config';
100 100
 
101 101
             $config = array();
102 102
             $config_yml = $ymlPath.'/config.yml';
Please login to merge, or discard this patch.
autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 } else {
20 20
     die('Composer is not installed.');
21 21
 }
22
-$loader->addPsr4('Plugin\\', __DIR__ . '/app/Plugin');
22
+$loader->addPsr4('Plugin\\', __DIR__.'/app/Plugin');
23 23
 
24 24
 // autoloader cache
25 25
 if (extension_loaded('apc') && ini_get('apc.enabled')) {
Please login to merge, or discard this patch.