Completed
Pull Request — experimental/3.1 (#2168)
by Kentaro
93:49 queued 72:21
created
src/Eccube/ServiceProvider/DebugServiceProvider.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -24,18 +24,15 @@
 block discarded – undo
24 24
 
25 25
 namespace Eccube\ServiceProvider;
26 26
 
27
-use Eccube\Common\Constant;
28 27
 use Eccube\DataCollector\EccubeDataCollector;
29 28
 use Pimple\Container;
30 29
 use Pimple\ServiceProviderInterface;
31 30
 use Silex\Api\BootableProviderInterface;
32 31
 use Silex\Application;
33 32
 use Symfony\Bridge\Twig\Extension\DumpExtension;
34
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
35 33
 use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector;
36 34
 use Symfony\Component\HttpKernel\EventListener\DumpListener;
37 35
 use Symfony\Component\VarDumper\Cloner\VarCloner;
38
-use Symfony\Component\VarDumper\Dumper\CliDumper;
39 36
 use Symfony\Component\VarDumper\Dumper\HtmlDumper;
40 37
 use Symfony\Component\VarDumper\VarDumper;
41 38
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 {
73 73
     public function register(Container $app)
74 74
     {
75
-        $app['var_dumper.cloner'] = function ($app) {
75
+        $app['var_dumper.cloner'] = function($app) {
76 76
             $cloner = new VarCloner();
77 77
 
78 78
             if (isset($app['debug.max_items'])) {
@@ -86,37 +86,37 @@  discard block
 block discarded – undo
86 86
             return $cloner;
87 87
         };
88 88
 
89
-        $app->extend('data_collector.templates', function ($templates) {
89
+        $app->extend('data_collector.templates', function($templates) {
90 90
             return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig')));
91 91
         });
92 92
 
93
-        $app['data_collector.dump'] = function ($app) {
93
+        $app['data_collector.dump'] = function($app) {
94 94
             return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format'], null, null, new HtmlDumper());
95 95
         };
96 96
 
97
-        $app->extend('data_collectors', function ($collectors, $app) {
98
-            $collectors['dump'] = function ($app) {
97
+        $app->extend('data_collectors', function($collectors, $app) {
98
+            $collectors['dump'] = function($app) {
99 99
                 return $app['data_collector.dump'];
100 100
             };
101 101
 
102
-            $collectors['eccube'] = function ($app) {
102
+            $collectors['eccube'] = function($app) {
103 103
                 return new EccubeDataCollector($app);
104 104
             };
105 105
             return $collectors;
106 106
         });
107 107
 
108
-        $app->extend('data_collector.templates', function ($templates, $app) {
108
+        $app->extend('data_collector.templates', function($templates, $app) {
109 109
                 array_unshift($templates, ['eccube', '@EccubeProfiler/eccube.html.twig']);
110 110
                 return $templates;
111 111
             }
112 112
         );
113 113
 
114
-        $app->extend('twig.loader.filesystem', function ($filesystem, $app) {
114
+        $app->extend('twig.loader.filesystem', function($filesystem, $app) {
115 115
                 return $filesystem;
116 116
             }
117 117
         );
118 118
 
119
-        $app->extend('twig', function ($twig, $app) {
119
+        $app->extend('twig', function($twig, $app) {
120 120
             if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) {
121 121
                 $twig->addExtension(new DumpExtension($app['var_dumper.cloner']));
122 122
             }
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
             return $twig;
125 125
         });
126 126
 
127
-        $app->extend('twig.loader.filesystem', function ($loader, $app) {
127
+        $app->extend('twig.loader.filesystem', function($loader, $app) {
128 128
             $loader->addPath($app['debug.templates_path'], 'Debug');
129 129
             $loader->addPath(__DIR__.'/../Resource/template/toolbar', 'EccubeProfiler');
130 130
 
131 131
             return $loader;
132 132
         });
133 133
 
134
-        $app['debug.templates_path'] = function () {
134
+        $app['debug.templates_path'] = function() {
135 135
             $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration');
136 136
 
137 137
             return dirname(dirname($r->getFileName())).'/Resources/views';
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
         // This code is here to lazy load the dump stack. This default
144 144
         // configuration for CLI mode is overridden in HTTP mode on
145 145
         // 'kernel.request' event
146
-        VarDumper::setHandler(function ($var) use ($app) {
146
+        VarDumper::setHandler(function($var) use ($app) {
147 147
             $dumper = $app['data_collector.dump'];
148 148
             $cloner = $app['var_dumper.cloner'];
149 149
 
150
-            $handler = function ($var) use ($dumper, $cloner) {
150
+            $handler = function($var) use ($dumper, $cloner) {
151 151
                 $dumper->dump($cloner->cloneVar($var));
152 152
             };
153 153
 
Please login to merge, or discard this patch.
app/Acme/Controller/AController.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -2,14 +2,9 @@
 block discarded – undo
2 2
 namespace Acme\Controller;
3 3
 
4 4
 use Eccube\Application;
5
-use Symfony\Component\HttpFoundation\Response;
6 5
 use Symfony\Component\HttpFoundation\Request;
7
-use Symfony\Component\HttpFoundation\ParameterBag;
8 6
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
9
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
10
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
11 7
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
12
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
13 8
 
14 9
 /**
15 10
  * @Route("/test")
Please login to merge, or discard this patch.
app/Acme/Controller/RoutingTestController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      * @Security("has_role('ROLE_ADMIN')")
17 17
      *
18 18
      * @param Application $app
19
-     * @return \Symfony\Component\HttpFoundation\Response
19
+     * @return string
20 20
      */
21 21
     public function testAdmin(Application $app)
22 22
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Acme\Controller;
4 4
 
5 5
 use Eccube\Application;
6
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
7 6
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8 7
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
9 8
 
Please login to merge, or discard this patch.
app/Acme/Controller/TestController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,13 +4,10 @@
 block discarded – undo
4 4
 use Eccube\Application;
5 5
 use Symfony\Component\HttpFoundation\Response;
6 6
 use Symfony\Component\HttpFoundation\Request;
7
-use Symfony\Component\HttpFoundation\ParameterBag;
8
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
9 7
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
10 8
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
11 9
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
12 10
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
13
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
14 11
 
15 12
 /**
16 13
  * @Route("/test")
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Store/PluginController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,6 @@
 block discarded – undo
31 31
 use Eccube\Form\Type\Admin\PluginLocalInstallType;
32 32
 use Eccube\Form\Type\Admin\PluginManagementType;
33 33
 use Eccube\Util\Str;
34
-use Monolog\Logger;
35 34
 use Symfony\Component\Filesystem\Filesystem;
36 35
 use Symfony\Component\Finder\Finder;
37 36
 use Symfony\Component\Form\Extension\Core\Type\TextType;
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/OrderDetailCollection.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
     public function hasProductByName($productName)
36 36
     {
37 37
         $OrderDetails = array_filter($this->getArrayCopy(),
38
-                                     function ($OrderDetail) use ($productName) {
39
-                                         return $OrderDetail->getProductName() == $productName;
40
-                                     });
38
+                                        function ($OrderDetail) use ($productName) {
39
+                                            return $OrderDetail->getProductName() == $productName;
40
+                                        });
41 41
         return !empty($OrderDetails);
42 42
     }
43 43
     // map, filter, reduce も実装したい
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     {
19 19
         return new self(array_filter(
20 20
             $this->getArrayCopy(),
21
-            function ($OrderDetail) {
21
+            function($OrderDetail) {
22 22
                 if ($OrderDetail->getProductClass()) {
23 23
                     return true;
24 24
                 }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function hasProductByName($productName)
36 36
     {
37 37
         $OrderDetails = array_filter($this->getArrayCopy(),
38
-                                     function ($OrderDetail) use ($productName) {
38
+                                     function($OrderDetail) use ($productName) {
39 39
                                          return $OrderDetail->getProductName() == $productName;
40 40
                                      });
41 41
         return !empty($OrderDetails);
Please login to merge, or discard this patch.
src/Eccube/Service/CartService.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     }
232 232
 
233 233
     /**
234
-     * @param  \Eccube\Entity\ProductClass|integer $ProductClass
234
+     * @param  string $ProductClass
235 235
      * @param  integer $quantity
236 236
      * @return \Eccube\Service\CartService
237 237
      * @throws CartException
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
      * 在庫数と販売制限数ともに個数が超えていれば、少ない方を適用させてメッセージを表示する
646 646
      *
647 647
      * @param ProductClass $ProductClass
648
-     * @param $productName
648
+     * @param string $productName
649 649
      * @param $quantity
650 650
      * @return int チェック後に更新した個数
651 651
      */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@
 block discarded – undo
302 302
         // 制限数チェック(在庫不足の場合は、処理の中でカート内商品を削除している)
303 303
         $quantity = $this->setProductLimit($ProductClass, $productName, $tmp_quantity);
304 304
 
305
-		// 新しい数量でカート内商品を登録する
305
+        // 新しい数量でカート内商品を登録する
306 306
         if (0 < $quantity) {
307 307
             $CartItem = new CartItem();
308 308
             $CartItem
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function getProductQuantity($productClassId)
224 224
     {
225
-        $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId);
225
+        $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId);
226 226
         if ($CartItem) {
227 227
             return $CartItem->getQuantity();
228 228
         } else {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             $CartItem = new CartItem();
308 308
             $CartItem
309 309
                 ->setClassName('Eccube\Entity\ProductClass')
310
-                ->setClassId((string)$ProductClass->getId())
310
+                ->setClassId((string) $ProductClass->getId())
311 311
                 ->setPrice($ProductClass->getPrice02IncTax())
312 312
                 ->setQuantity($quantity);
313 313
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     public function removeProduct($productClassId)
467 467
     {
468
-        $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId);
468
+        $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId);
469 469
 
470 470
         // 支払方法の再設定
471 471
         if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/MasterdataDataType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
             ->add('name', TextType::class, array(
66 66
                 'required' => false,
67 67
             ))
68
-        ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) {
68
+        ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) {
69 69
             $form = $event->getForm();
70 70
             $data = $form->getData();
71 71
             if (strlen($data['id']) && strlen($data['name']) == 0) {
Please login to merge, or discard this patch.
src/Eccube/Command/GeneratorCommand/generatortemplate/ServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $app->match('/plugin/[lower_code]/hello', 'Plugin\[code]\Controller\[code]Controller::index')->bind('plugin_[code]_hello');
34 34
 
35 35
         // Form
36
-        $app['form.types'] = $app->extend('form.types', function ($types) use ($app) {
36
+        $app['form.types'] = $app->extend('form.types', function($types) use ($app) {
37 37
             $types[] = new [code]ConfigType();
38 38
 
39 39
             return $types;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         // }
58 58
 
59 59
         // ログファイル設定
60
-        $app['monolog.logger.[lower_code]'] = function ($app) {
60
+        $app['monolog.logger.[lower_code]'] = function($app) {
61 61
 
62 62
             $logger = new $app['monolog.logger.class']('[lower_code]');
63 63
 
Please login to merge, or discard this patch.