Completed
Pull Request — experimental/3.1 (#2654)
by chihiro
180:45 queued 164:04
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.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -660,13 +660,13 @@
 block discarded – undo
660 660
         $pluginConfigs = PluginConfigManager::getPluginConfigAll($this['debug']);
661 661
         $ormMappings = array();
662 662
         $ormMappings[] = array(
663
-             'type' => 'annotation',
664
-             'namespace' => 'Eccube\Entity',
665
-             'path' => array(
666
-                 __DIR__.'/Entity'
667
-             ),
668
-             'use_simple_annotation_reader' => false,
669
-         );
663
+                'type' => 'annotation',
664
+                'namespace' => 'Eccube\Entity',
665
+                'path' => array(
666
+                    __DIR__.'/Entity'
667
+                ),
668
+                'use_simple_annotation_reader' => false,
669
+            );
670 670
 
671 671
         if (isset($this['config']['vendor_dir']) && file_exists($this['config']['vendor_dir'].'/Entity')) {
672 672
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $this->register(new MobileDetectServiceProvider());
237 237
         $this->register(new TwigLintServiceProvider());
238 238
 
239
-        $this->error(function (\Exception $e, Request $request, $code) {
239
+        $this->error(function(\Exception $e, Request $request, $code) {
240 240
             if ($this['debug']) {
241 241
                 return;
242 242
             }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
         $pluginSubDirs = (function($dirName) use ($enabledPluginDirs) {
303 303
             return array_map(function($pluginDir) use ($dirName) {
304
-                return $pluginDir . '/' . $dirName;
304
+                return $pluginDir.'/'.$dirName;
305 305
             }, $enabledPluginDirs);
306 306
         });
307 307
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             return $router;
379 379
         });
380 380
 
381
-        $this['eccube.router.origin'] = function ($app) {
381
+        $this['eccube.router.origin'] = function($app) {
382 382
             $resource = __DIR__.'/Controller';
383 383
             $cachePrefix = 'Origin';
384 384
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
         $this['eccube.routers.plugin'] = [];
389 389
 
390 390
         if (isset($this['config']['vendor_dir']) && file_exists($this['config']['vendor_dir'].'/Controller')) {
391
-            $this['eccube.router.extend'] = function ($app) {
391
+            $this['eccube.router.extend'] = function($app) {
392 392
                 $resource = $app['config']['vendor_dir'].'/Controller';
393 393
                 $cachePrefix = 'Extend';
394 394
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                 return $router;
398 398
             };
399 399
         }
400
-        $this->extend('request_matcher', function ($matcher, $app) {
400
+        $this->extend('request_matcher', function($matcher, $app) {
401 401
             $matchers = [];
402 402
             if (isset($app['eccube.router.extend'])) {
403 403
                 $matchers[] = $app['eccube.router.extend'];
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
             return new ChainUrlMatcher($matchers, $app['request_context']);
412 412
         });
413 413
 
414
-        $this->extend('url_generator', function ($generator, $app) {
414
+        $this->extend('url_generator', function($generator, $app) {
415 415
             $generators = [];
416 416
             if (isset($app['eccube.router.extend'])) {
417 417
                 $generators[] = $app['eccube.router.extend'];
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         });
427 427
 
428 428
         // Route CollectionにEC-CUBEで定義したルーティングを追加(debug tool barに出力するため)
429
-        $this->extend('routes', function ($routes, $app) {
429
+        $this->extend('routes', function($routes, $app) {
430 430
             if (isset($app['eccube.router.extend'])) {
431 431
                 $routes->addCollection($app['eccube.router.extend']->getRouteCollection());
432 432
             }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
462 462
             'locale_fallbacks' => [$this['config']['locale'], 'en'],
463 463
         ));
464
-        $this->extend('translator', function ($translator, \Silex\Application $app) {
464
+        $this->extend('translator', function($translator, \Silex\Application $app) {
465 465
             $translator->addLoader('php', new \Symfony\Component\Translation\Loader\PhpFileLoader());
466 466
 
467 467
             $file = __DIR__.'/Resource/locale/messages.'.$app['locale'].'.php';
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
505 505
             'twig.form.templates' => array('Form/form_div_layout.twig'),
506 506
         ));
507
-        $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
507
+        $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
508 508
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
509 509
             $twig->addExtension(new \Twig_Extension_StringLoader());
510 510
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
             return $runtimes;
523 523
         });
524 524
 
525
-        $this->before(function (Request $request, \Silex\Application $app) {
525
+        $this->before(function(Request $request, \Silex\Application $app) {
526 526
             $app['admin'] = $app['front'] = false;
527 527
             $pathinfo = rawurldecode($request->getPathInfo());
528 528
             if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) {
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
                 }
539 539
                 $paths[] = $app['config']['template_admin_realdir'];
540 540
                 $paths[] = __DIR__.'/../../app/Plugin';
541
-                $cacheDir =  __DIR__.'/../../app/cache/twig/admin';
541
+                $cacheDir = __DIR__.'/../../app/cache/twig/admin';
542 542
             } else {
543 543
                 // モバイル端末時、smartphoneディレクトリを探索パスに追加する.
544 544
                 if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) {
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
                 }
554 554
                 $paths[] = $app['config']['template_default_realdir'];
555 555
                 $paths[] = __DIR__.'/../../app/Plugin';
556
-                $cacheDir =  __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
556
+                $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
557 557
             }
558 558
             $app['twig']->setCache($app['debug'] ? null : $cacheDir);
559 559
             $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         }, self::EARLY_EVENT);
572 572
 
573 573
         // twigのグローバル変数を定義.
574
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
574
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
575 575
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
576 576
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
577 577
             if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) {
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
657 657
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
658 658
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
659
-                \Swift::init(function () {
659
+                \Swift::init(function() {
660 660
                     \Swift_DependencyContainer::getInstance()
661 661
                         ->register('mime.qpheaderencoder')
662 662
                         ->asAliasOf('mime.base64headerencoder');
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
         $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider());
692 692
 
693 693
         $app = $this;
694
-        $this->extend('db.event_manager', function ($evm) use ($app) {
694
+        $this->extend('db.event_manager', function($evm) use ($app) {
695 695
             $initSubscriber = new InitSubscriber($app);
696 696
             $evm->addEventSubscriber($initSubscriber);
697 697
 
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 
809 809
         $this->extend(
810 810
             'orm.em.config',
811
-            function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
811
+            function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
812 812
 
813 813
                 /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */
814 814
                 $chain = $config->getMetadataDriverImpl();
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
             }
831 831
         );
832 832
 
833
-        $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
833
+        $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
834 834
             // save
835 835
             $saveEventSubscriber = new \Eccube\Doctrine\EventSubscriber\SaveEventSubscriber($app);
836 836
             $em->getEventManager()->addEventSubscriber($saveEventSubscriber);
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
             // second level cacheの設定.
856 856
             $this->extend(
857 857
                 'orm.em.config',
858
-                function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
858
+                function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
859 859
                     $config->setSecondLevelCacheEnabled();
860 860
                     $cacheConfig = $config->getSecondLevelCacheConfiguration();
861 861
                     $regionConfig = $cacheConfig->getRegionsConfiguration();
@@ -944,31 +944,31 @@  discard block
 block discarded – undo
944 944
             array('^/mypage', 'ROLE_USER', $channel),
945 945
         );
946 946
 
947
-        $this['eccube.password_encoder'] = function ($app) {
947
+        $this['eccube.password_encoder'] = function($app) {
948 948
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
949 949
         };
950
-        $this['security.encoder_factory'] = function ($app) {
950
+        $this['security.encoder_factory'] = function($app) {
951 951
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
952 952
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
953 953
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
954 954
             ));
955 955
         };
956
-        $this['eccube.event_listner.security'] = function ($app) {
956
+        $this['eccube.event_listner.security'] = function($app) {
957 957
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
958 958
         };
959 959
 
960 960
         // Voterの設定
961
-        $this['authority_voter'] = function ($app) {
961
+        $this['authority_voter'] = function($app) {
962 962
             return new \Eccube\Security\Voter\AuthorityVoter($app);
963 963
         };
964 964
 
965
-        $this->extend('security.voters', function ($voters, \Silex\Application $app) {
965
+        $this->extend('security.voters', function($voters, \Silex\Application $app) {
966 966
             $voters[] = $app['authority_voter'];
967 967
 
968 968
             return $voters;
969 969
         });
970 970
 
971
-        $this['security.access_manager'] = function ($app) {
971
+        $this['security.access_manager'] = function($app) {
972 972
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
973 973
         };
974 974
 
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
         // ロードバランサやプロキシの設定をする
984 984
         $config = $this['config'];
985 985
         if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) {
986
-            $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) {
986
+            $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) {
987 987
                 // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する
988 988
                 Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies']));
989 989
             }, self::EARLY_EVENT);
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
         $this->register(new ServiceProvider\EccubePluginServiceProvider());
1003 1003
 
1004 1004
         // TODO Acme\ServiceProvider の初期化はここで OK?
1005
-        if (array_key_exists('service',$this['config'])) {
1005
+        if (array_key_exists('service', $this['config'])) {
1006 1006
             foreach ($this['config']['service'] as $service) {
1007 1007
                 $this->register(new $service);
1008 1008
             }
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
         $app = $this;
1125 1125
 
1126 1126
         // Response Event(http cache対応、event実行は一番遅く設定)
1127
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1127
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1128 1128
 
1129 1129
             if (!$event->isMasterRequest()) {
1130 1130
                 return;
Please login to merge, or discard this patch.
src/Eccube/Service/MailService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         ));
62 62
 
63 63
         $message = \Swift_Message::newInstance()
64
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
64
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
65 65
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
66 66
             ->setTo(array($Customer->getEmail()))
67 67
             ->setBcc($this->BaseInfo->getEmail01())
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         ));
103 103
 
104 104
         $message = \Swift_Message::newInstance()
105
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。')
105
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録が完了しました。')
106 106
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
107 107
             ->setTo(array($Customer->getEmail()))
108 108
             ->setBcc($this->BaseInfo->getEmail01())
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         ));
145 145
 
146 146
         $message = \Swift_Message::newInstance()
147
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了')
147
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 退会手続きのご完了')
148 148
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
149 149
             ->setTo(array($email))
150 150
             ->setBcc($this->BaseInfo->getEmail01())
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         // 問い合わせ者にメール送信
189 189
         $message = \Swift_Message::newInstance()
190
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。')
190
+            ->setSubject('['.$this->BaseInfo->getShopName().'] お問い合わせを受け付けました。')
191 191
             ->setFrom(array($this->BaseInfo->getEmail02() => $this->BaseInfo->getShopName()))
192 192
             ->setTo(array($formData['email']))
193 193
             ->setBcc($this->BaseInfo->getEmail02())
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         ));
245 245
 
246 246
         $message = \Swift_Message::newInstance()
247
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $MailTemplate->getSubject())
247
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$MailTemplate->getSubject())
248 248
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
249 249
             ->setTo(array($Order->getEmail()))
250 250
             ->setBcc($this->BaseInfo->getEmail01())
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         ));
289 289
 
290 290
         $message = \Swift_Message::newInstance()
291
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認')
291
+            ->setSubject('['.$this->BaseInfo->getShopName().'] 会員登録のご確認')
292 292
             ->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName()))
293 293
             ->setTo(array($Customer->getEmail()))
294 294
             ->setBcc($this->BaseInfo->getEmail01())
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         ));
333 333
 
334 334
         $message = \Swift_Message::newInstance()
335
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] ' . $formData['subject'])
335
+            ->setSubject('['.$this->BaseInfo->getShopName().'] '.$formData['subject'])
336 336
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
337 337
             ->setTo(array($Order->getEmail()))
338 338
             ->setBcc($this->BaseInfo->getEmail01())
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         ));
374 374
 
375 375
         $message = \Swift_Message::newInstance()
376
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のご確認')
376
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のご確認')
377 377
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
378 378
             ->setTo(array($Customer->getEmail()))
379 379
             ->setBcc($this->BaseInfo->getEmail01())
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         ));
415 415
 
416 416
         $message = \Swift_Message::newInstance()
417
-            ->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')
417
+            ->setSubject('['.$this->BaseInfo->getShopName().'] パスワード変更のお知らせ')
418 418
             ->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))
419 419
             ->setTo(array($Customer->getEmail()))
420 420
             ->setBcc($this->BaseInfo->getEmail01())
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 2 patches
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.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -108,6 +108,9 @@
 block discarded – undo
108 108
         ];
109 109
     }
110 110
 
111
+    /**
112
+     * @param string $logFile
113
+     */
111 114
     private function parseLogFile($logFile, $formData)
112 115
     {
113 116
         $log = array();
Please login to merge, or discard this patch.
src/Eccube/Repository/ProductRepository.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 $key = sprintf('keyword%s', $index);
114 114
                 $qb
115 115
                     ->andWhere(sprintf('NORMALIZE(p.name) LIKE NORMALIZE(:%s) OR NORMALIZE(p.search_word) LIKE NORMALIZE(:%s)', $key, $key))
116
-                    ->setParameter($key, '%' . $keyword . '%');
116
+                    ->setParameter($key, '%'.$keyword.'%');
117 117
             }
118 118
         }
119 119
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $qb
177 177
                 ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid')
178 178
                 ->setParameter('id', $id)
179
-                ->setParameter('likeid', '%' . $searchData['id'] . '%');
179
+                ->setParameter('likeid', '%'.$searchData['id'].'%');
180 180
         }
181 181
 
182 182
         // code
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,10 @@
 block discarded – undo
25 25
 namespace Eccube\Repository;
26 26
 
27 27
 use Doctrine\ORM\EntityManager;
28
-use Doctrine\ORM\NoResultException;
29 28
 use Eccube\Annotation\Inject;
30 29
 use Eccube\Annotation\Repository;
31 30
 use Eccube\Doctrine\Query\Queries;
32 31
 use Eccube\Util\Str;
33
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
34 32
 
35 33
 /**
36 34
  * ProductRepository
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     protected $appConfig;
62 62
 
63
-   /**
63
+    /**
64 64
      * get query builder.
65 65
      *
66 66
      * @param  array $searchData
Please login to merge, or discard this patch.
src/Eccube/Command/GeneratorCommand/AbstractPluginGenerator.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      * @param array $metadatas
349 349
      * @param array $fsList
350 350
      * @param $pluginCode
351
-     * @param $codePath
351
+     * @param string $codePath
352 352
      */
353 353
     protected function generateMigration(array $metadatas, array &$fsList = array(), $pluginCode, $codePath)
354 354
     {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      *
374 374
      * @param $pluginCode
375 375
      * @param array $metadatas
376
-     * @return mixed|string
376
+     * @return string
377 377
      */
378 378
     protected function makeMigration($pluginCode, array $metadatas)
379 379
     {
Please login to merge, or discard this patch.
src/Eccube/Application/ApplicationTrait.php 3 patches
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Eccube\Application;
4 4
 
5
-use Eccube\Event\TemplateEvent;
6
-use Monolog\Logger;
7
-use Symfony\Component\Form\FormBuilder;
8 5
 use Symfony\Component\HttpFoundation\Request;
9 6
 use Symfony\Component\HttpFoundation\Response;
10
-use Symfony\Component\HttpFoundation\StreamedResponse;
11 7
 use Symfony\Component\HttpKernel\HttpKernelInterface;
12
-use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
13
-use Symfony\Component\Security\Core\User\UserInterface;
14 8
 
15 9
 trait ApplicationTrait
16 10
 {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,32 +19,32 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function addSuccess($message, $namespace = 'front')
21 21
     {
22
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message);
22
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message);
23 23
     }
24 24
 
25 25
     public function addError($message, $namespace = 'front')
26 26
     {
27
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message);
27
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message);
28 28
     }
29 29
 
30 30
     public function addDanger($message, $namespace = 'front')
31 31
     {
32
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message);
32
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message);
33 33
     }
34 34
 
35 35
     public function addWarning($message, $namespace = 'front')
36 36
     {
37
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message);
37
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message);
38 38
     }
39 39
 
40 40
     public function addInfo($message, $namespace = 'front')
41 41
     {
42
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message);
42
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message);
43 43
     }
44 44
 
45 45
     public function addRequestError($message, $namespace = 'front')
46 46
     {
47
-        $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message);
47
+        $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message);
48 48
     }
49 49
 
50 50
     public function clearMessage()
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (is_null($namespace)) {
64 64
             $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath);
65 65
         } else {
66
-            $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath);
66
+            $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath);
67 67
         }
68 68
     }
69 69
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param Response $response
112 112
      * @return Application
113 113
      */
114
-    public function forwardChain($path, array $requestParameters = [], Response &$response = null)
114
+    public function forwardChain($path, array $requestParameters = [], Response&$response = null)
115 115
     {
116 116
         $response = $this->forward($path, $requestParameters);
117 117
         return $this;
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,6 +16,7 @@  discard block
 block discarded – undo
16 16
 {
17 17
     /**
18 18
      * Application Shortcut Methods
19
+     * @param string $message
19 20
      */
20 21
     public function addSuccess($message, $namespace = 'front')
21 22
     {
@@ -58,6 +59,9 @@  discard block
 block discarded – undo
58 59
         $this->addWarning('admin.delete.warning', 'admin');
59 60
     }
60 61
 
62
+    /**
63
+     * @param string $targetPath
64
+     */
61 65
     public function setLoginTargetPath($targetPath, $namespace = null)
62 66
     {
63 67
         if (is_null($namespace)) {
@@ -109,7 +113,7 @@  discard block
 block discarded – undo
109 113
      * @param string $path フォワード先のパス
110 114
      * @param array $requestParameters
111 115
      * @param Response $response
112
-     * @return Application
116
+     * @return ApplicationTrait
113 117
      */
114 118
     public function forwardChain($path, array $requestParameters = [], Response &$response = null)
115 119
     {
@@ -122,7 +126,7 @@  discard block
 block discarded – undo
122 126
      * Pimple標準では再登録を行うと, `RuntimeException: Cannot override frozen service`が投げられるため,一度unsetしてから再登録を行う.
123 127
      * config系の変更程度に利用はとどめること
124 128
      *
125
-     * @param $key
129
+     * @param string $key
126 130
      * @param $service
127 131
      * @throws \InvalidArgumentException keyが存在しない場合.
128 132
      */
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ChangePasswordType.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,6 @@
 block discarded – undo
27 27
 use Symfony\Component\Form\Extension\Core\Type\PasswordType;
28 28
 use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
29 29
 use Symfony\Component\Form\FormBuilderInterface;
30
-use Symfony\Component\Form\FormError;
31
-use Symfony\Component\Form\FormEvents;
32 30
 use Symfony\Component\OptionsResolver\OptionsResolver;
33 31
 use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
34 32
 use Symfony\Component\Validator\Constraints as Assert;
Please login to merge, or discard this patch.