Failed Conditions
Pull Request — experimental/3.1 (#2208)
by chihiro
34:43
created
src/Eccube/Application.php 3 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.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,6 @@  discard block
 block discarded – undo
27 27
 use Eccube\Application\ApplicationTrait;
28 28
 use Eccube\Common\Constant;
29 29
 use Eccube\Doctrine\DBAL\Types\UTCDateTimeType;
30
-use Eccube\Doctrine\ORM\Mapping\Driver\YamlDriver;
31
-use Eccube\EventListener\TransactionListener;
32 30
 use Eccube\Plugin\ConfigManager as PluginConfigManager;
33 31
 use Eccube\Routing\EccubeRouter;
34 32
 use Eccube\ServiceProvider\MobileDetectServiceProvider;
@@ -39,13 +37,11 @@  discard block
 block discarded – undo
39 37
 use Sergiors\Silex\Provider\TemplatingServiceProvider;
40 38
 use Sergiors\Silex\Routing\ChainUrlGenerator;
41 39
 use Sergiors\Silex\Routing\ChainUrlMatcher;
42
-use Symfony\Component\EventDispatcher\EventDispatcher;
43 40
 use Symfony\Component\Finder\Finder;
44 41
 use Symfony\Component\HttpFoundation\Request;
45 42
 use Symfony\Component\HttpFoundation\Response;
46 43
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
47 44
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
48
-use Symfony\Component\HttpKernel\Event\PostResponseEvent;
49 45
 use Symfony\Component\HttpKernel\KernelEvents;
50 46
 use Symfony\Component\Yaml\Yaml;
51 47
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $this->register(new \Silex\Provider\ValidatorServiceProvider());
165 165
         $this->register(new MobileDetectServiceProvider());
166 166
 
167
-        $this->error(function (\Exception $e, Request $request, $code) {
167
+        $this->error(function(\Exception $e, Request $request, $code) {
168 168
             if ($this['debug']) {
169 169
                 return;
170 170
             }
@@ -258,14 +258,14 @@  discard block
 block discarded – undo
258 258
             return $router;
259 259
         });
260 260
 
261
-        $this['eccube.router.origin'] = function ($app) {
261
+        $this['eccube.router.origin'] = function($app) {
262 262
             $resource = __DIR__.'/Controller';
263 263
             $cachePrefix = 'Origin';
264 264
 
265 265
             return $app['eccube.router']($resource, $cachePrefix);
266 266
         };
267 267
 
268
-        $this['eccube.routers.plugin'] = function ($app) {
268
+        $this['eccube.routers.plugin'] = function($app) {
269 269
             // TODO 有効なプラグインを対象とする必要がある.
270 270
             $dirs = Finder::create()
271 271
                 ->in($app['config']['root_dir'].'/app/Plugin')
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             return $routers;
283 283
         };
284 284
 
285
-        $this['eccube.router.extend'] = function ($app) {
285
+        $this['eccube.router.extend'] = function($app) {
286 286
             // TODO ディレクトリ名は暫定
287 287
             $resource = $app['config']['root_dir'].'/app/Acme/Controller';
288 288
             $cachePrefix = 'Extend';
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             return $router;
293 293
         };
294 294
 
295
-        $this->extend('request_matcher', function ($matcher, $app) {
295
+        $this->extend('request_matcher', function($matcher, $app) {
296 296
             $matchers = [];
297 297
             $matchers[] = $app['eccube.router.extend'];
298 298
             foreach ($app['eccube.routers.plugin'] as $router) {
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             return new ChainUrlMatcher($matchers, $app['request_context']);
305 305
         });
306 306
 
307
-        $this->extend('url_generator', function ($generator, $app) {
307
+        $this->extend('url_generator', function($generator, $app) {
308 308
             $generators = [];
309 309
             $generators[] = $app['eccube.router.extend'];
310 310
             foreach ($app['eccube.routers.plugin'] as $router) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
336 336
             'locale_fallbacks' => ['ja', 'en'],
337 337
         ));
338
-        $this->extend('translator', function ($translator, \Silex\Application $app) {
338
+        $this->extend('translator', function($translator, \Silex\Application $app) {
339 339
             $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader());
340 340
 
341 341
             $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml';
@@ -382,14 +382,14 @@  discard block
 block discarded – undo
382 382
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
383 383
             'twig.form.templates' => array('Form/form_layout.twig'),
384 384
         ));
385
-        $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
385
+        $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
386 386
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
387 387
             $twig->addExtension(new \Twig_Extension_StringLoader());
388 388
 
389 389
             return $twig;
390 390
         });
391 391
 
392
-        $this->before(function (Request $request, \Silex\Application $app) {
392
+        $this->before(function(Request $request, \Silex\Application $app) {
393 393
             $app['admin'] = $app['front'] = false;
394 394
             $pathinfo = rawurldecode($request->getPathInfo());
395 395
             if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) {
@@ -405,14 +405,14 @@  discard block
 block discarded – undo
405 405
                 }
406 406
                 $paths[] = $app['config']['template_admin_realdir'];
407 407
                 $paths[] = __DIR__.'/../../app/Plugin';
408
-                $cacheDir =  __DIR__.'/../../app/cache/twig/admin';
408
+                $cacheDir = __DIR__.'/../../app/cache/twig/admin';
409 409
             } else {
410 410
                 if (file_exists($app['config']['template_realdir'])) {
411 411
                     $paths[] = $app['config']['template_realdir'];
412 412
                 }
413 413
                 $paths[] = $app['config']['template_default_realdir'];
414 414
                 $paths[] = __DIR__.'/../../app/Plugin';
415
-                $cacheDir =  __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
415
+                $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
416 416
             }
417 417
             $app['twig']->setCache($app['debug'] ? null : $cacheDir);
418 418
             $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
         }, self::EARLY_EVENT);
431 431
 
432 432
         // twigのグローバル変数を定義.
433
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
433
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
434 434
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
435 435
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
436 436
             if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) {
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
498 498
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
499 499
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
500
-                \Swift::init(function () {
500
+                \Swift::init(function() {
501 501
                     \Swift_DependencyContainer::getInstance()
502 502
                         ->register('mime.qpheaderencoder')
503 503
                         ->asAliasOf('mime.base64headerencoder');
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
                     'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract',
630 630
                 ),
631 631
             ));
632
-            $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
632
+            $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
633 633
                 // tax_rule
634 634
                 $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule');
635 635
                 $taxRuleRepository->setApplication($app);
@@ -729,31 +729,31 @@  discard block
 block discarded – undo
729 729
             array('^/mypage', 'ROLE_USER', $channel),
730 730
         );
731 731
 
732
-        $this['eccube.password_encoder'] = function ($app) {
732
+        $this['eccube.password_encoder'] = function($app) {
733 733
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
734 734
         };
735
-        $this['security.encoder_factory'] = function ($app) {
735
+        $this['security.encoder_factory'] = function($app) {
736 736
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
737 737
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
738 738
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
739 739
             ));
740 740
         };
741
-        $this['eccube.event_listner.security'] = function ($app) {
741
+        $this['eccube.event_listner.security'] = function($app) {
742 742
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
743 743
         };
744 744
 
745 745
         // Voterの設定
746
-        $this['authority_voter'] = function ($app) {
746
+        $this['authority_voter'] = function($app) {
747 747
             return new \Eccube\Security\Voter\AuthorityVoter($app);
748 748
         };
749 749
 
750
-        $this->extend('security.voters', function ($voters, \Silex\Application $app) {
750
+        $this->extend('security.voters', function($voters, \Silex\Application $app) {
751 751
             $voters[] = $app['authority_voter'];
752 752
 
753 753
             return $voters;
754 754
         });
755 755
 
756
-        $this['security.access_manager'] = function ($app) {
756
+        $this['security.access_manager'] = function($app) {
757 757
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
758 758
         };
759 759
 
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
     {
768 768
         $config = $this['config'];
769 769
         if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) {
770
-            $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) {
770
+            $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) {
771 771
                 // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する
772 772
                 Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies']));
773 773
             }, self::EARLY_EVENT);
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
         $app = $this;
928 928
 
929 929
         // Response Event(http cache対応、event実行は一番遅く設定)
930
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
930
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
931 931
 
932 932
             if (!$event->isMasterRequest()) {
933 933
                 return;
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
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function __construct()
63 63
     {
64
-        $this->config_path = __DIR__ . '/../../../../app/config/eccube';
65
-        $this->dist_path = __DIR__ . '/../../Resource/config';
66
-        $this->cache_path = __DIR__ . '/../../../../app/cache';
64
+        $this->config_path = __DIR__.'/../../../../app/config/eccube';
65
+        $this->dist_path = __DIR__.'/../../Resource/config';
66
+        $this->cache_path = __DIR__.'/../../../../app/cache';
67 67
     }
68 68
 
69 69
     private function isValid(Request $request, Form $form)
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         return $app['twig']->render('step1.twig', array(
115 115
                 'form' => $form->createView(),
116
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
116
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
117 117
         ));
118 118
     }
119 119
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         return $app['twig']->render('step2.twig', array(
138 138
                 'protectedDirs' => $protectedDirs,
139
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
139
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
140 140
         ));
141 141
     }
142 142
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         if (empty($sessionData['shop_name'])) {
152 152
 
153
-            $config_file = $this->config_path . '/config.yml';
153
+            $config_file = $this->config_path.'/config.yml';
154 154
             $fs = new Filesystem();
155 155
 
156 156
             if ($fs->exists($config_file)) {
@@ -164,11 +164,11 @@  discard block
 block discarded – undo
164 164
                 }
165 165
 
166 166
                 // セキュリティの設定
167
-                $config_file = $this->config_path . '/path.yml';
167
+                $config_file = $this->config_path.'/path.yml';
168 168
                 $config = Yaml::parse(file_get_contents($config_file));
169 169
                 $sessionData['admin_dir'] = $config['admin_route'];
170 170
 
171
-                $config_file = $this->config_path . '/config.yml';
171
+                $config_file = $this->config_path.'/config.yml';
172 172
                 $config = Yaml::parse(file_get_contents($config_file));
173 173
 
174 174
                 $allowHost = $config['admin_allow_host'];
@@ -178,14 +178,14 @@  discard block
 block discarded – undo
178 178
                 $sessionData['admin_force_ssl'] = (bool) $config['force_ssl'];
179 179
 
180 180
                 // ロードバランサー、プロキシサーバ設定
181
-                $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only'];
181
+                $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only'];
182 182
                 $trustedProxies = $config['trusted_proxies'];
183 183
                 if (count($trustedProxies) > 0) {
184 184
                     $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", $trustedProxies));
185 185
                 }
186 186
 
187 187
                 // メール設定
188
-                $config_file = $this->config_path . '/mail.yml';
188
+                $config_file = $this->config_path.'/mail.yml';
189 189
                 $config = Yaml::parse(file_get_contents($config_file));
190 190
                 $mail = $config['mail'];
191 191
                 $sessionData['mail_backend'] = $mail['transport'];
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
         return $app['twig']->render('step3.twig', array(
210 210
                 'form' => $form->createView(),
211
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
211
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
212 212
         ));
213 213
     }
214 214
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         if (empty($sessionData['database'])) {
225 225
 
226
-            $config_file = $this->config_path . '/database.yml';
226
+            $config_file = $this->config_path.'/database.yml';
227 227
             $fs = new Filesystem();
228 228
 
229 229
             if ($fs->exists($config_file)) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
         return $app['twig']->render('step4.twig', array(
253 253
                 'form' => $form->createView(),
254
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
254
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
255 255
         ));
256 256
     }
257 257
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                 $host = $request->getSchemeAndHttpHost();
298 298
                 $basePath = $request->getBasePath();
299 299
                 $params = array(
300
-                    'http_url' => $host . $basePath,
300
+                    'http_url' => $host.$basePath,
301 301
                     'shop_name' => $sessionData['shop_name'],
302 302
                 );
303 303
 
@@ -312,16 +312,16 @@  discard block
 block discarded – undo
312 312
 
313 313
         return $app['twig']->render('step5.twig', array(
314 314
                 'form' => $form->createView(),
315
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
315
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
316 316
         ));
317 317
     }
318 318
 
319 319
     //    インストール完了
320 320
     public function complete(InstallApplication $app, Request $request)
321 321
     {
322
-        $config_yml = $this->config_path . '/config.yml';
322
+        $config_yml = $this->config_path.'/config.yml';
323 323
         $config = Yaml::parse(file_get_contents($config_yml));
324
-        $config_path = $this->config_path . '/path.yml';
324
+        $config_path = $this->config_path.'/path.yml';
325 325
         $path_yml = Yaml::parse(file_get_contents($config_path));
326 326
 
327 327
         $config = array_replace_recursive($path_yml, $config);
@@ -336,11 +336,11 @@  discard block
 block discarded – undo
336 336
         $host = $request->getSchemeAndHttpHost();
337 337
         $basePath = $request->getBasePath();
338 338
 
339
-        $adminUrl = $host . $basePath . '/' . $config['admin_dir'];
339
+        $adminUrl = $host.$basePath.'/'.$config['admin_dir'];
340 340
 
341 341
         return $app['twig']->render('complete.twig', array(
342 342
                 'admin_url' => $adminUrl,
343
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
343
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
344 344
         ));
345 345
     }
346 346
 
@@ -356,12 +356,12 @@  discard block
 block discarded – undo
356 356
     {
357 357
         foreach ($this->required_modules as $module) {
358 358
             if (!extension_loaded($module)) {
359
-                $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install');
359
+                $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install');
360 360
             }
361 361
         }
362 362
 
363 363
         if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) {
364
-            $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
364
+            $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install');
365 365
         }
366 366
 
367 367
         foreach ($this->recommended_module as $module) {
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
             if (!function_exists('apache_get_modules')) {
390 390
                 $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install');
391 391
             } elseif (!in_array('mod_rewrite', apache_get_modules())) {
392
-                $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install');
392
+                $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install');
393 393
             }
394 394
         } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) {
395 395
             // iis
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
     private function setPDO()
402 402
     {
403
-        $config_file = $this->config_path . '/database.yml';
403
+        $config_file = $this->config_path.'/database.yml';
404 404
         $config = Yaml::parse(file_get_contents($config_file));
405 405
 
406 406
         try {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
     private function getEntityManager()
436 436
     {
437 437
         if (!isset($this->app['orm.em'])) {
438
-            $config_file = $this->config_path . '/database.yml';
438
+            $config_file = $this->config_path.'/database.yml';
439 439
             $database = Yaml::parse(file_get_contents($config_file));
440 440
 
441 441
             $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array(
@@ -447,8 +447,8 @@  discard block
 block discarded – undo
447 447
                     'type' => 'yml',
448 448
                     'namespace' => 'Eccube\Entity',
449 449
                     'path' => array(
450
-                        __DIR__ . '/../../Resource/doctrine',
451
-                        __DIR__ . '/../../Resource/doctrine/master',
450
+                        __DIR__.'/../../Resource/doctrine',
451
+                        __DIR__.'/../../Resource/doctrine/master',
452 452
                     ),
453 453
                 ),
454 454
                 array(  // TODO 暫定
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
                 }
481 481
             }
482 482
             $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
483
-                'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine',
483
+                'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine',
484 484
                 'orm.em.options' => array(
485 485
                     'mappings' => $ormMappings
486 486
                 )
@@ -508,11 +508,11 @@  discard block
 block discarded – undo
508 508
     {
509 509
         $this->resetNatTimer();
510 510
 
511
-        $config_file = $this->config_path . '/database.yml';
511
+        $config_file = $this->config_path.'/database.yml';
512 512
         $database = Yaml::parse(file_get_contents($config_file));
513 513
         $config['database'] = $database['database'];
514 514
 
515
-        $config_file = $this->config_path . '/config.yml';
515
+        $config_file = $this->config_path.'/config.yml';
516 516
         $baseConfig = Yaml::parse(file_get_contents($config_file));
517 517
         $config['config'] = $baseConfig;
518 518
 
@@ -570,11 +570,11 @@  discard block
 block discarded – undo
570 570
     {
571 571
         $this->resetNatTimer();
572 572
 
573
-        $config_file = $this->config_path . '/database.yml';
573
+        $config_file = $this->config_path.'/database.yml';
574 574
         $database = Yaml::parse(file_get_contents($config_file));
575 575
         $config['database'] = $database['database'];
576 576
 
577
-        $config_file = $this->config_path . '/config.yml';
577
+        $config_file = $this->config_path.'/config.yml';
578 578
         $baseConfig = Yaml::parse(file_get_contents($config_file));
579 579
         $config['config'] = $baseConfig;
580 580
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
         $config = new Configuration($app['db']);
638 638
         $config->setMigrationsNamespace('DoctrineMigrations');
639 639
 
640
-        $migrationDir = __DIR__ . '/../../Resource/doctrine/migration';
640
+        $migrationDir = __DIR__.'/../../Resource/doctrine/migration';
641 641
         $config->setMigrationsDirectory($migrationDir);
642 642
         $config->registerMigrationsFromDirectory($migrationDir);
643 643
 
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
     private function getProtectedDirs()
670 670
     {
671 671
         $protectedDirs = array();
672
-        $base = __DIR__ . '/../../../..';
672
+        $base = __DIR__.'/../../../..';
673 673
         $dirs = array(
674 674
             '/html',
675 675
             '/app',
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
         );
683 683
 
684 684
         foreach ($dirs as $dir) {
685
-            if (!is_writable($base . $dir)) {
685
+            if (!is_writable($base.$dir)) {
686 686
                 $protectedDirs[] = $dir;
687 687
             }
688 688
         }
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
     private function createConfigYamlFile($data, $auth = true)
694 694
     {
695 695
         $fs = new Filesystem();
696
-        $config_file = $this->config_path . '/config.yml';
696
+        $config_file = $this->config_path.'/config.yml';
697 697
 
698 698
         if ($fs->exists($config_file)) {
699 699
             $config = Yaml::parse(file_get_contents($config_file));
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 
735 735
         $fs = new Filesystem();
736 736
         $content = str_replace(
737
-            $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist')
737
+            $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist')
738 738
         );
739 739
         $fs->dumpFile($config_file, $content);
740 740
 
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 
751 751
     private function addInstallStatus()
752 752
     {
753
-        $config_file = $this->config_path . '/config.yml';
753
+        $config_file = $this->config_path.'/config.yml';
754 754
         $config = Yaml::parse(file_get_contents($config_file));
755 755
         $config['eccube_install'] = 1;
756 756
         $yml = Yaml::dump($config);
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
     private function createDatabaseYamlFile($data)
763 763
     {
764 764
         $fs = new Filesystem();
765
-        $config_file = $this->config_path . '/database.yml';
765
+        $config_file = $this->config_path.'/database.yml';
766 766
         if ($fs->exists($config_file)) {
767 767
             $fs->remove($config_file);
768 768
         }
@@ -795,14 +795,14 @@  discard block
 block discarded – undo
795 795
 
796 796
             $fs = new Filesystem();
797 797
             $content = str_replace(
798
-                $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist')
798
+                $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist')
799 799
             );
800 800
         } else {
801 801
             $content = Yaml::dump(
802 802
                     array(
803 803
                         'database' => array(
804 804
                             'driver' => 'pdo_sqlite',
805
-                            'path' => realpath($this->config_path . '/eccube.db')
805
+                            'path' => realpath($this->config_path.'/eccube.db')
806 806
                         )
807 807
                     )
808 808
             );
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
     private function createMailYamlFile($data)
816 816
     {
817 817
         $fs = new Filesystem();
818
-        $config_file = $this->config_path . '/mail.yml';
818
+        $config_file = $this->config_path.'/mail.yml';
819 819
         if ($fs->exists($config_file)) {
820 820
             $fs->remove($config_file);
821 821
         }
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 
831 831
         $fs = new Filesystem();
832 832
         $content = str_replace(
833
-            $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist')
833
+            $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist')
834 834
         );
835 835
         $fs->dumpFile($config_file, $content);
836 836
 
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
     private function createPathYamlFile($data, Request $request)
841 841
     {
842 842
         $fs = new Filesystem();
843
-        $config_file = $this->config_path . '/path.yml';
843
+        $config_file = $this->config_path.'/path.yml';
844 844
         if ($fs->exists($config_file)) {
845 845
             $fs->remove($config_file);
846 846
         }
@@ -848,16 +848,16 @@  discard block
 block discarded – undo
848 848
         $ADMIN_ROUTE = $data['admin_dir'];
849 849
         $TEMPLATE_CODE = 'default';
850 850
         $USER_DATA_ROUTE = 'user_data';
851
-        $ROOT_DIR = realpath(__DIR__ . '/../../../../');
851
+        $ROOT_DIR = realpath(__DIR__.'/../../../../');
852 852
         $ROOT_URLPATH = $request->getBasePath();
853
-        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH;
853
+        $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH;
854 854
 
855 855
         $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}');
856 856
         $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH);
857 857
 
858 858
         $fs = new Filesystem();
859 859
         $content = str_replace(
860
-            $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist')
860
+            $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist')
861 861
         );
862 862
         $fs->dumpFile($config_file, $content);
863 863
 
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
 
867 867
     private function sendAppData($params)
868 868
     {
869
-        $config_file = $this->config_path . '/database.yml';
869
+        $config_file = $this->config_path.'/database.yml';
870 870
         $db_config = Yaml::parse(file_get_contents($config_file));
871 871
 
872 872
         $this->setPDO();
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         }
879 879
 
880 880
         if ($db_config['database']['driver'] === 'pdo_mysql') {
881
-            $db_ver = 'MySQL:' . $version;
881
+            $db_ver = 'MySQL:'.$version;
882 882
         } else {
883 883
             $db_ver = $version;
884 884
         }
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 
897 897
         $header = array(
898 898
             'Content-Type: application/x-www-form-urlencoded',
899
-            'Content-Length: ' . strlen($data),
899
+            'Content-Length: '.strlen($data),
900 900
         );
901 901
         $context = stream_context_create(
902 902
             array(
@@ -923,7 +923,7 @@  discard block
 block discarded – undo
923 923
     public function migration(InstallApplication $app, Request $request)
924 924
     {
925 925
         return $app['twig']->render('migration.twig', array(
926
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
926
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
927 927
         ));
928 928
     }
929 929
 
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
             return $app['twig']->render('migration_plugin.twig', array(
953 953
                     'Plugins' => $Plugins,
954 954
                     'version' => Constant::VERSION,
955
-                    'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
955
+                    'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
956 956
             ));
957 957
         }
958 958
     }
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
         \Eccube\Util\Cache::clear($config_app, true);
976 976
 
977 977
         return $app['twig']->render('migration_end.twig', array(
978
-                'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/',
978
+                'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/',
979 979
         ));
980 980
     }
981 981
 }
Please login to merge, or discard this patch.
html/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
 }
28 28
 
29 29
 //[INFO]index.php,install.phpをEC-CUBEルート直下に移動させる場合は、コメントアウトしている行に置き換える
30
-require __DIR__ . '/../autoload.php';
30
+require __DIR__.'/../autoload.php';
31 31
 //require __DIR__ . '/autoload.php';
32 32
 
33 33
 $app = new Eccube\InstallApplication();
34 34
 $app['debug'] = true;
35
-$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
35
+$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) {
36 36
     if (!$request->getSession()->isStarted()) {
37 37
         $request->getSession()->start();
38 38
     }
Please login to merge, or discard this patch.
html/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 //require __DIR__.'/autoload.php';
28 28
 
29 29
 ini_set('display_errors', 'Off');
30
-error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
30
+error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT);
31 31
 
32 32
 // see http://silex.sensiolabs.org/doc/web_servers.html#php-5-4
33 33
 $filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/CsvImportType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
                 'constraints' => array(
54 54
                     new Assert\NotBlank(array('message' => 'ファイルを選択してください。')),
55 55
                     new Assert\File(array(
56
-                        'maxSize' => $app['config']['csv_size'] . 'M',
57
-                        'maxSizeMessage' => 'CSVファイルは' . $app['config']['csv_size'] . 'M以下でアップロードしてください。',
56
+                        'maxSize' => $app['config']['csv_size'].'M',
57
+                        'maxSizeMessage' => 'CSVファイルは'.$app['config']['csv_size'].'M以下でアップロードしてください。',
58 58
                     )),
59 59
                 ),
60 60
             ));
Please login to merge, or discard this patch.
src/Eccube/Form/Type/AddCartType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 }
113 113
             }
114 114
 
115
-            $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) {
115
+            $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) {
116 116
                 $data = $event->getData();
117 117
                 $form = $event->getForm();
118 118
                 if (!is_null($Product->getClassName2())) {
Please login to merge, or discard this patch.
src/Eccube/Command/CacheClearCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         $this->app = $this->getSilexApplication();
54 54
         
55
-        \Eccube\Util\Cache::clear($this->app,$input->getOption('all'));
55
+        \Eccube\Util\Cache::clear($this->app, $input->getOption('all'));
56 56
         $output->writeln(sprintf("%s <info>success</info>", 'cache:clear'));
57 57
 
58 58
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
 
25 25
 namespace Eccube\Command;
26 26
 
27
-use Symfony\Component\Console\Input\InputArgument;
28 27
 use Symfony\Component\Console\Input\InputInterface;
29 28
 use Symfony\Component\Console\Input\InputOption;
30 29
 use Symfony\Component\Console\Output\OutputInterface;
Please login to merge, or discard this patch.
src/Eccube/Log/Monolog/Helper/LogHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $webProcessor = new WebProcessor();
112 112
         $uidProcessor = new UidProcessor(8);
113 113
 
114
-        $FingerCrossedHandler->pushProcessor(function ($record) use ($app, $uidProcessor, $webProcessor) {
114
+        $FingerCrossedHandler->pushProcessor(function($record) use ($app, $uidProcessor, $webProcessor) {
115 115
             // ログフォーマットに出力する値を独自に設定
116 116
 
117 117
             $record['level_name'] = sprintf("%-5s", $record['level_name']);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/LogController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             return $log;
84 84
         }
85 85
 
86
-        foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) as $line) {
86
+        foreach (array_reverse(file($logFile, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES)) as $line) {
87 87
             // 上限に達した場合、処理を抜ける
88 88
             if (count($log) >= $formData['line_max']) {
89 89
                 break;
Please login to merge, or discard this patch.