Failed Conditions
Pull Request — master (#1340)
by Tsuyoshi
18:56
created
src/Eccube/Controller/Install/InstallController.php 1 patch
Spacing   +33 added lines, -33 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)
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 $host = $request->getSchemeAndHttpHost();
208 208
                 $basePath = $request->getBasePath();
209 209
                 $params = array(
210
-                    'http_url' => $host . $basePath,
210
+                    'http_url' => $host.$basePath,
211 211
                     'shop_name' => $sessionData['shop_name'],
212 212
                 );
213 213
 
@@ -228,13 +228,13 @@  discard block
 block discarded – undo
228 228
     //    インストール完了
229 229
     public function complete(InstallApplication $app, Request $request)
230 230
     {
231
-        $config_file = $this->config_path . '/path.yml';
231
+        $config_file = $this->config_path.'/path.yml';
232 232
         $config = Yaml::parse($config_file);
233 233
 
234 234
         $host = $request->getSchemeAndHttpHost();
235 235
         $basePath = $request->getBasePath();
236 236
 
237
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
237
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
238 238
 
239 239
         return $app['twig']->render('complete.twig', array(
240 240
             'admin_url' => $adminUrl,
@@ -254,17 +254,17 @@  discard block
 block discarded – undo
254 254
     {
255 255
         foreach ($this->required_modules as $module) {
256 256
             if (!extension_loaded($module)) {
257
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
257
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
258 258
             }
259 259
         }
260 260
 
261 261
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
262
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
262
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
263 263
         }
264 264
 
265 265
         foreach ($this->recommended_module as $module) {
266 266
             if (!extension_loaded($module)) {
267
-                $app->addWarning('[推奨] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
267
+                $app->addWarning('[推奨] '.$module.' 拡張モジュールが有効になっていません。', 'install');
268 268
             }
269 269
         }
270 270
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             if (!function_exists('apache_get_modules')) {
283 283
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
284 284
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
285
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
285
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
286 286
             }
287 287
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
288 288
             // iis
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
     private function setPDO()
295 295
     {
296
-        $config_file = $this->config_path . '/database.yml';
296
+        $config_file = $this->config_path.'/database.yml';
297 297
         $config = Yaml::parse($config_file);
298 298
 
299 299
         try {
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      */
329 329
     private function getEntityManager()
330 330
     {
331
-        $config_file = $this->config_path . '/database.yml';
331
+        $config_file = $this->config_path.'/database.yml';
332 332
         $database = Yaml::parse($config_file);
333 333
 
334 334
         $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -336,15 +336,15 @@  discard block
 block discarded – undo
336 336
         ));
337 337
 
338 338
         $this->app->register(new \Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
339
-            'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
339
+            'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
340 340
             'orm.em.options' => array(
341 341
                 'mappings' => array(
342 342
                     array(
343 343
                         'type' => 'yml',
344 344
                         'namespace' => 'Eccube\Entity',
345 345
                         'path' => array(
346
-                            __DIR__ . '/../../Resource/doctrine',
347
-                            __DIR__ . '/../../Resource/doctrine/master',
346
+                            __DIR__.'/../../Resource/doctrine',
347
+                            __DIR__.'/../../Resource/doctrine/master',
348 348
                         ),
349 349
                     ),
350 350
 
@@ -372,11 +372,11 @@  discard block
 block discarded – undo
372 372
     {
373 373
         $this->resetNatTimer();
374 374
 
375
-        $config_file = $this->config_path . '/database.yml';
375
+        $config_file = $this->config_path.'/database.yml';
376 376
         $database = Yaml::parse($config_file);
377 377
         $config['database'] = $database['database'];
378 378
 
379
-        $config_file = $this->config_path . '/config.yml';
379
+        $config_file = $this->config_path.'/config.yml';
380 380
         $baseConfig = Yaml::parse($config_file);
381 381
         $config['config'] = $baseConfig;
382 382
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $config = new Configuration($app['db']);
436 436
         $config->setMigrationsNamespace('DoctrineMigrations');
437 437
 
438
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
438
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
439 439
         $config->setMigrationsDirectory($migrationDir);
440 440
         $config->registerMigrationsFromDirectory($migrationDir);
441 441
 
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
     private function getProtectedDirs()
460 460
     {
461 461
         $protectedDirs = array();
462
-        $base = __DIR__ . '/../../../..';
462
+        $base = __DIR__.'/../../../..';
463 463
         $dirs = array(
464 464
             '/html',
465 465
             '/app',
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         );
473 473
 
474 474
         foreach ($dirs as $dir) {
475
-            if (!is_writable($base . $dir)) {
475
+            if (!is_writable($base.$dir)) {
476 476
                 $protectedDirs[] = $dir;
477 477
             }
478 478
         }
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     private function createConfigYamlFile($data)
484 484
     {
485 485
         $fs = new Filesystem();
486
-        $config_file = $this->config_path . '/config.yml';
486
+        $config_file = $this->config_path.'/config.yml';
487 487
         if ($fs->exists($config_file)) {
488 488
             $fs->remove($config_file);
489 489
         }
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
         $content = str_replace(
504 504
             $target,
505 505
             $replace,
506
-            file_get_contents($this->dist_path . '/config.yml.dist')
506
+            file_get_contents($this->dist_path.'/config.yml.dist')
507 507
         );
508 508
         $fs->dumpFile($config_file, $content);
509 509
 
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 
518 518
     private function addInstallStatus()
519 519
     {
520
-        $config_file = $this->config_path . '/config.yml';
520
+        $config_file = $this->config_path.'/config.yml';
521 521
         $config = Yaml::parse($config_file);
522 522
         $config['eccube_install'] = 1;
523 523
         $yml = Yaml::dump($config);
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
     private function createDatabaseYamlFile($data)
530 530
     {
531 531
         $fs = new Filesystem();
532
-        $config_file = $this->config_path . '/database.yml';
532
+        $config_file = $this->config_path.'/database.yml';
533 533
         if ($fs->exists($config_file)) {
534 534
             $fs->remove($config_file);
535 535
         }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
         $content = str_replace(
563 563
             $target,
564 564
             $replace,
565
-            file_get_contents($this->dist_path . '/database.yml.dist')
565
+            file_get_contents($this->dist_path.'/database.yml.dist')
566 566
         );
567 567
 
568 568
         $fs->dumpFile($config_file, $content);
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
     private function createMailYamlFile($data)
574 574
     {
575 575
         $fs = new Filesystem();
576
-        $config_file = $this->config_path . '/mail.yml';
576
+        $config_file = $this->config_path.'/mail.yml';
577 577
         if ($fs->exists($config_file)) {
578 578
             $fs->remove($config_file);
579 579
         }
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
         $content = str_replace(
591 591
             $target,
592 592
             $replace,
593
-            file_get_contents($this->dist_path . '/mail.yml.dist')
593
+            file_get_contents($this->dist_path.'/mail.yml.dist')
594 594
         );
595 595
         $fs->dumpFile($config_file, $content);
596 596
 
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
     private function createPathYamlFile($data, Request $request)
601 601
     {
602 602
         $fs = new Filesystem();
603
-        $config_file = $this->config_path . '/path.yml';
603
+        $config_file = $this->config_path.'/path.yml';
604 604
         if ($fs->exists($config_file)) {
605 605
             $fs->remove($config_file);
606 606
         }
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
         $ADMIN_ROUTE = $data['admin_dir'];
609 609
         $TEMPLATE_CODE = 'default';
610 610
         $USER_DATA_ROUTE = 'user_data';
611
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
611
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
612 612
         $ROOT_URLPATH = $request->getBasePath();
613 613
 
614 614
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}');
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         $content = str_replace(
619 619
             $target,
620 620
             $replace,
621
-            file_get_contents($this->dist_path . '/path.yml.dist')
621
+            file_get_contents($this->dist_path.'/path.yml.dist')
622 622
         );
623 623
         $fs->dumpFile($config_file, $content);
624 624
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
     private function sendAppData($params)
629 629
     {
630
-        $config_file = $this->config_path . '/database.yml';
630
+        $config_file = $this->config_path.'/database.yml';
631 631
         $db_config = Yaml::parse($config_file);
632 632
 
633 633
         $this->setPDO();
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
         }
640 640
 
641 641
         if ($db_config['database']['driver'] === 'pdo_mysql') {
642
-            $db_ver = 'MySQL:' . $version;
642
+            $db_ver = 'MySQL:'.$version;
643 643
         } else {
644 644
             $db_ver = $version;
645 645
         }
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
 
658 658
         $header = array(
659 659
             'Content-Type: application/x-www-form-urlencoded',
660
-            'Content-Length: ' . strlen($data),
660
+            'Content-Length: '.strlen($data),
661 661
         );
662 662
         $context = stream_context_create(
663 663
             array(
Please login to merge, or discard this patch.
src/Eccube/Controller/Mypage/DeliveryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
         // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する
81 81
         if (!in_array($parentPage, $allowdParents)) {
82
-            $parentPage  = $app->url('mypage_delivery');
82
+            $parentPage = $app->url('mypage_delivery');
83 83
         }
84 84
 
85 85
         /* @var $form \Symfony\Component\Form\FormInterface */
Please login to merge, or discard this patch.
src/Eccube/Controller/UserDataController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $paths[] = $app['config']['user_data_realdir'];
53 53
         $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
54 54
 
55
-        $file = $PageLayout->getFileName() . '.twig';
55
+        $file = $PageLayout->getFileName().'.twig';
56 56
 
57 57
         return $app['twig']->render($file);
58 58
     }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/Filter/NoStockHiddenFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
33 33
     {
34 34
         if ($targetEntity->reflClass->getName() === 'Eccube\Entity\ProductClass') {
35
-            return $targetTableAlias . '.stock >= 1 OR ' . $targetTableAlias . '.stock_unlimited = 1';
35
+            return $targetTableAlias.'.stock >= 1 OR '.$targetTableAlias.'.stock_unlimited = 1';
36 36
         } else {
37 37
             return "";
38 38
         }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/Filter/OrderStatusFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
     {
34 34
         // 決済処理中/購入処理中を除く.
35 35
         if ($targetEntity->reflClass->getName() === 'Eccube\Entity\Order') {
36
-            return $targetTableAlias . '.status <> 7 AND ' . $targetTableAlias . '.status <> 8';
36
+            return $targetTableAlias.'.status <> 7 AND '.$targetTableAlias.'.status <> 8';
37 37
         }
38 38
 
39 39
         // 決済処理中/購入処理中を除く.
40 40
         if ($targetEntity->reflClass->getName() === 'Eccube\Entity\Master\OrderStatus') {
41
-            return $targetTableAlias . '.id <> 7 AND ' . $targetTableAlias . '.id <> 8';
41
+            return $targetTableAlias.'.id <> 7 AND '.$targetTableAlias.'.id <> 8';
42 42
         }
43 43
 
44 44
         return '';
Please login to merge, or discard this patch.
src/Eccube/Doctrine/Filter/SoftDeleteFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
47 47
     {
48 48
         if ($targetEntity->hasField('del_flg') && !in_array($targetEntity->getName(), $this->getExcludes())) {
49
-            return $targetTableAlias . '.del_flg = 0';
49
+            return $targetTableAlias.'.del_flg = 0';
50 50
         } else {
51 51
             return "";
52 52
         }
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($dir->getRealPath() . '/config.yml');
46
+            $config = Yaml::parse($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/Form/Type/AddCartType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
                 }
114 114
             }
115 115
 
116
-            $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) {
116
+            $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) {
117 117
                 $data = $event->getData();
118 118
                 $form = $event->getForm();
119 119
                 if ($Product->getClassName2()) {
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.