Failed Conditions
Pull Request — experimental/3.1 (#2486)
by
unknown
68:04 queued 25:47
created
src/Eccube/Controller/CartController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 use Eccube\Annotation\Inject;
29 29
 use Eccube\Application;
30 30
 use Eccube\Entity\CartItem;
31
-use Eccube\Entity\ProductClass;
32 31
 use Eccube\Event\EccubeEvents;
33 32
 use Eccube\Event\EventArgs;
34 33
 use Eccube\Repository\ProductClassRepository;
Please login to merge, or discard this patch.
src/Eccube/Form/Type/AddCartType.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 use Doctrine\ORM\EntityManager;
28 28
 use Eccube\Annotation\FormType;
29 29
 use Eccube\Annotation\Inject;
30
-use Eccube\Application;
31 30
 use Eccube\Entity\CartItem;
32 31
 use Eccube\Form\DataTransformer\EntityToIdTransformer;
33 32
 use Symfony\Component\Form\AbstractType;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 }
125 125
             }
126 126
 
127
-            $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) {
127
+            $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) {
128 128
                 $data = $event->getData();
129 129
                 $form = $event->getForm();
130 130
                 if (isset($data['classcategory_id1']) && !is_null($Product->getClassName2())) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 }
138 138
             });
139 139
 
140
-            $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
140
+            $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
141 141
                 /** @var CartItem $CartItem */
142 142
                 $CartItem = $event->getData();
143 143
                 $ProductClass = $CartItem->getProductClass();
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/EccubeServiceProvider.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function register(Container $app)
71 71
     {
72
-        $app[BaseInfo::class] = function () use ($app) {
72
+        $app[BaseInfo::class] = function() use ($app) {
73 73
             return $app[BaseInfoRepository::class]->get();
74 74
         };
75 75
 
76
-        $app['eccube.calculate.context'] = function () use ($app) {
76
+        $app['eccube.calculate.context'] = function() use ($app) {
77 77
                 return new \Eccube\Service\Calculator\CalculateContext();
78 78
         };
79 79
 
80
-        $app['eccube.calculate.strategies'] = function () use ($app) {
80
+        $app['eccube.calculate.strategies'] = function() use ($app) {
81 81
             $Collection = new \Eccube\Service\Calculator\CalculateStrategyCollection();
82 82
             $Collection->setApplication($app);
83 83
             //$Collection->setOrder($Order);
@@ -90,47 +90,47 @@  discard block
 block discarded – undo
90 90
             $Collection->add($app['eccube.calculate.strategy.calculate_total']);
91 91
             return $Collection;
92 92
         };
93
-        $app['eccube.calculate.strategy.shipping'] = function () use ($app) {
93
+        $app['eccube.calculate.strategy.shipping'] = function() use ($app) {
94 94
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy();
95 95
                 $Strategy->setApplication($app);
96 96
                 return $Strategy;
97 97
         };
98
-        $app['eccube.calculate.strategy.charge'] = function () use ($app) {
98
+        $app['eccube.calculate.strategy.charge'] = function() use ($app) {
99 99
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ChargeStrategy();
100 100
                 $Strategy->setApplication($app);
101 101
                 return $Strategy;
102 102
         };
103 103
 
104
-        $app['eccube.calculate.strategy.tax'] = function () use ($app) {
104
+        $app['eccube.calculate.strategy.tax'] = function() use ($app) {
105 105
                 $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy();
106 106
                 $Strategy->setApplication($app);
107 107
                 return $Strategy;
108 108
         };
109 109
 
110
-        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function () use ($app) {
110
+        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function() use ($app) {
111 111
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateDeliveryFeeStrategy();
112 112
             $Strategy->setApplication($app);
113 113
             return $Strategy;
114 114
         };
115
-        $app['eccube.calculate.strategy.calculate_charge'] = function () use ($app) {
115
+        $app['eccube.calculate.strategy.calculate_charge'] = function() use ($app) {
116 116
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateChargeStrategy();
117 117
             $Strategy->setApplication($app);
118 118
             return $Strategy;
119 119
         };
120
-        $app['eccube.calculate.strategy.calculate_total'] = function () use ($app) {
120
+        $app['eccube.calculate.strategy.calculate_total'] = function() use ($app) {
121 121
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateTotalStrategy();
122 122
             $Strategy->setApplication($app);
123 123
             return $Strategy;
124 124
         };
125 125
 
126
-        $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) {
126
+        $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) {
127 127
                 $PaymentMethod = new $clazz;
128 128
                 $PaymentMethod->setApplication($app);
129 129
                 $PaymentMethod->setFormType($form);
130 130
                 return $PaymentMethod;
131 131
         });
132 132
 
133
-        $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) {
133
+        $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) {
134 134
                 $PaymentMethod = new $clazz;
135 135
                 $PaymentMethod->setApplication($app);
136 136
                 $PaymentMethod->setFormType($form);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 return $PaymentMethod;
139 139
         });
140 140
 
141
-        $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) {
141
+        $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) {
142 142
             $Service = new \Eccube\Service\CalculateService($Order, $Customer);
143 143
             $Context = $app['eccube.calculate.context'];
144 144
             $app['eccube.calculate.strategies']->setOrder($Order);
@@ -149,24 +149,24 @@  discard block
 block discarded – undo
149 149
             return $Service;
150 150
         });
151 151
 
152
-        $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) {
152
+        $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) {
153 153
             $Service = new $clazz($app['request_stack']);
154 154
 
155 155
             return $Service;
156 156
         });
157 157
 
158
-        $app['paginator'] = $app->protect(function () {
158
+        $app['paginator'] = $app->protect(function() {
159 159
             $paginator = new \Knp\Component\Pager\Paginator();
160 160
             $paginator->subscribe(new \Eccube\EventListener\PaginatorListener());
161 161
 
162 162
             return $paginator;
163 163
         });
164 164
 
165
-        $app['request_scope'] = function () {
165
+        $app['request_scope'] = function() {
166 166
             return new ParameterBag();
167 167
         };
168 168
         // TODO 使用するか検討
169
-        $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) {
169
+        $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) {
170 170
             $compiler
171 171
             ->addDebugInfo($node)
172 172
             ->write("echo 'Helloooooo ' . ")
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         });
178 178
         // TODO 使用するか検討
179
-        $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) {
179
+        $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) {
180 180
             $compiler
181 181
             ->addDebugInfo($node)
182 182
             ->write("echo 'jirooooooo ' . ")
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         });
188 188
 
189 189
         // TODO 使用するか検討
190
-        $app['eccube.twig.generic_node_names'] = function () use ($app) {
190
+        $app['eccube.twig.generic_node_names'] = function() use ($app) {
191 191
             return [
192 192
                 'hello',
193 193
                 'jiro',
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         };
197 197
 
198 198
         // TODO 使用するか検討
199
-        $app['twig_parsers'] = function () use ($app) {
199
+        $app['twig_parsers'] = function() use ($app) {
200 200
             $GenericTokenParsers = [];
201 201
             foreach ($app['eccube.twig.generic_node_names'] as $tagName) {
202 202
                 $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName);
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             return $GenericTokenParsers;
205 205
         };
206 206
 
207
-        $app['eccube.twig.block.templates'] = function () {
207
+        $app['eccube.twig.block.templates'] = function() {
208 208
             $templates = new ArrayCollection();
209 209
             $templates[] = 'render_block.twig';
210 210
 
@@ -212,17 +212,17 @@  discard block
 block discarded – undo
212 212
         };
213 213
 
214 214
         $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener());
215
-        $app['eccube.queries'] = function () {
215
+        $app['eccube.queries'] = function() {
216 216
             return new \Eccube\Doctrine\Query\Queries();
217 217
         };
218 218
         // TODO QueryCustomizerの追加方法は要検討
219 219
         $app['eccube.queries']->addCustomizer(new \Acme\Entity\AdminProductListCustomizer());
220 220
 
221
-        $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null) {
221
+        $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null) {
222 222
             return new PurchaseContext($origin);
223 223
         });
224 224
 
225
-        $app['eccube.purchase.flow.cart.item_processors'] = function ($app) {
225
+        $app['eccube.purchase.flow.cart.item_processors'] = function($app) {
226 226
             $processors = new ArrayCollection();
227 227
             $processors->add(new DeletedProductValidator());
228 228
             $processors->add(new DisplayStatusValidator());
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             return $processors;
233 233
         };
234 234
 
235
-        $app['eccube.purchase.flow.cart.holder_processors'] = function ($app) {
235
+        $app['eccube.purchase.flow.cart.holder_processors'] = function($app) {
236 236
             $processors = new ArrayCollection();
237 237
             $processors->add(new PaymentProcessor($app[DeliveryRepository::class]));
238 238
             $processors->add(new PaymentTotalLimitValidator($app['config']['max_total_fee']));
@@ -242,34 +242,34 @@  discard block
 block discarded – undo
242 242
             return $processors;
243 243
         };
244 244
 
245
-        $app['eccube.purchase.flow.cart.add_item_processors'] = function ($app) {
245
+        $app['eccube.purchase.flow.cart.add_item_processors'] = function($app) {
246 246
             return new ArrayCollection([
247 247
                 new AddItemProcessor($app['eccube.purchase.flow.cart.item_comparer']),
248 248
             ]);
249 249
         };
250 250
 
251 251
         // example
252
-        $app->extend('eccube.purchase.flow.cart.item_processors', function ($processors, $app) {
252
+        $app->extend('eccube.purchase.flow.cart.item_processors', function($processors, $app) {
253 253
 
254 254
             $processors->add(new StockValidator());
255 255
 
256 256
             return $processors;
257 257
         });
258 258
 
259
-        $app['eccube.purchase.flow.cart.item_comparer'] = function ($app) {
259
+        $app['eccube.purchase.flow.cart.item_comparer'] = function($app) {
260 260
             return new ItemComparerCollection([
261 261
                 $app['eccube.purchase.flow.item_comparer.product_class'],
262 262
                 $app['eccube.purchase.flow.item_comparer.price'],
263 263
             ]);
264 264
         };
265 265
 
266
-        $app['eccube.purchase.flow.order.add_item_processors'] = function ($app) {
266
+        $app['eccube.purchase.flow.order.add_item_processors'] = function($app) {
267 267
             return new ArrayCollection([
268 268
                 new AddItemProcessor($app['eccube.purchase.flow.order.item_comparer']),
269 269
             ]);
270 270
         };
271 271
 
272
-        $app['eccube.purchase.flow.order.item_comparer'] = function ($app) {
272
+        $app['eccube.purchase.flow.order.item_comparer'] = function($app) {
273 273
             return new ItemComparerCollection([
274 274
                 $app['eccube.purchase.flow.item_comparer.product_class'],
275 275
                 $app['eccube.purchase.flow.item_comparer.price'],
@@ -278,23 +278,23 @@  discard block
 block discarded – undo
278 278
             ]);
279 279
         };
280 280
 
281
-        $app['eccube.purchase.flow.item_comparer.product_class'] = function ($app) {
281
+        $app['eccube.purchase.flow.item_comparer.product_class'] = function($app) {
282 282
             return new ProductClassComparer();
283 283
         };
284 284
 
285
-        $app['eccube.purchase.flow.item_comparer.price'] = function ($app) {
285
+        $app['eccube.purchase.flow.item_comparer.price'] = function($app) {
286 286
             return new PriceComparer();
287 287
         };
288 288
 
289
-        $app['eccube.purchase.flow.item_comparer.tax'] = function ($app) {
289
+        $app['eccube.purchase.flow.item_comparer.tax'] = function($app) {
290 290
             return new TaxComparer();
291 291
         };
292 292
 
293
-        $app['eccube.purchase.flow.item_comparer.order_item_type'] = function ($app) {
293
+        $app['eccube.purchase.flow.item_comparer.order_item_type'] = function($app) {
294 294
             return new OrderItemTypeComparer();
295 295
         };
296 296
 
297
-        $app['eccube.purchase.flow.cart'] = function ($app) {
297
+        $app['eccube.purchase.flow.cart'] = function($app) {
298 298
             $flow = new PurchaseFlow();
299 299
             $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']);
300 300
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']);
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             return $flow;
304 304
         };
305 305
 
306
-        $app['eccube.purchase.flow.shopping'] = function () use ($app) {
306
+        $app['eccube.purchase.flow.shopping'] = function() use ($app) {
307 307
             $flow = new PurchaseFlow();
308 308
             $flow->addItemProcessor(new StockValidator());
309 309
             $flow->addItemProcessor(new DisplayStatusValidator());
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             return $flow;
314 314
         };
315 315
 
316
-        $app['eccube.purchase.flow.order'] = function () use ($app) {
316
+        $app['eccube.purchase.flow.order'] = function() use ($app) {
317 317
             $flow = new PurchaseFlow();
318 318
             $flow->addItemProcessor(new StockValidator());
319 319
             $flow->addItemHolderProcessor(new PaymentTotalLimitValidator($app['config']['max_total_fee']));
Please login to merge, or discard this patch.
src/Eccube/Common/Collection/StrictArrayCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     {
81 81
         $collection = $this;
82 82
 
83
-        $newFunc = function ($element) use ($collection, $func) {
83
+        $newFunc = function($element) use ($collection, $func) {
84 84
 
85 85
             $new = $func($element);
86 86
 
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Comparer/OrderItemTypeComparer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
         $OrderItemType1 = $Item1->getOrderItemType();
40 40
         $OrderItemType2 = $Item2->getOrderItemType();
41 41
 
42
-        $order_item_type_id1 = $OrderItemType1 ? (string)$OrderItemType1->getId() : null;
43
-        $order_item_type_id2 = $OrderItemType2 ? (string)$OrderItemType2->getId() : null;
42
+        $order_item_type_id1 = $OrderItemType1 ? (string) $OrderItemType1->getId() : null;
43
+        $order_item_type_id2 = $OrderItemType2 ? (string) $OrderItemType2->getId() : null;
44 44
 
45 45
         // FIXME 暫定的に、商品以外は全て別商品とする
46 46
         return
47
-            $order_item_type_id1 === (string)OrderItemType::PRODUCT &&
48
-            $order_item_type_id2 === (string)OrderItemType::PRODUCT;
47
+            $order_item_type_id1 === (string) OrderItemType::PRODUCT &&
48
+            $order_item_type_id2 === (string) OrderItemType::PRODUCT;
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Comparer/TaxComparer.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
             (
38 38
                 intval($Item1->getTaxRule()) === intval($Item2->getTaxRule()) &&
39 39
                 intval($Item1->getTaxRate()) === intval($Item2->getTaxRate())
40
-            ) :
41
-            true;
40
+            ) : true;
42 41
     }
43 42
 }
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Comparer/ProductClassComparer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
     {
35 35
         $ProductClass1 = $Item1->getProductClass();
36 36
         $ProductClass2 = $Item2->getProductClass();
37
-        $product_class_id1 = $ProductClass1 ? (string)$ProductClass1->getId() : null;
38
-        $product_class_id2 = $ProductClass2 ? (string)$ProductClass2->getId() : null;
37
+        $product_class_id1 = $ProductClass1 ? (string) $ProductClass1->getId() : null;
38
+        $product_class_id2 = $ProductClass2 ? (string) $ProductClass2->getId() : null;
39 39
 
40 40
         return $product_class_id1 === $product_class_id2;
41 41
     }
Please login to merge, or discard this patch.