Failed Conditions
Pull Request — experimental/3.1 (#2526)
by Kentaro
49:12 queued 42:52
created
src/Eccube/Repository/CustomerRepository.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -392,7 +392,7 @@
 block discarded – undo
392 392
     /**
393 393
      * 会員の初回購入時間、購入時間、購入回数、購入金額を更新する
394 394
      *
395
-     * @param $app
395
+     * @param \Eccube\Application $app
396 396
      * @param  Customer $Customer
397 397
      * @param  $orderStatusId
398 398
      */
Please login to merge, or discard this patch.
src/Eccube/Repository/NewsRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      */
115 115
     public function delete($News)
116 116
     {
117
-       $this->createQueryBuilder('n')
117
+        $this->createQueryBuilder('n')
118 118
             ->update()
119 119
             ->set('n.rank', 'n.rank - 1')
120 120
             ->where('n.rank > :rank')
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/NewsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
             $News = new \Eccube\Entity\News();
123 123
         }
124 124
 
125
-        $News->setLinkMethod((bool)$News->getLinkMethod());
125
+        $News->setLinkMethod((bool) $News->getLinkMethod());
126 126
 
127 127
         $builder = $this->formFactory
128 128
             ->createBuilder(NewsType::class, $News);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ClassCategoryController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $num = $this->productClassRepository->createQueryBuilder('pc')
183 183
             ->select('count(pc.id)')
184 184
             ->where('pc.ClassCategory1 = :id OR pc.ClassCategory2 = :id')
185
-            ->setParameter('id',$id)
185
+            ->setParameter('id', $id)
186 186
             ->getQuery()
187 187
             ->getSingleScalarResult();
188 188
         if ($num > 0) {
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 log_error('規格分類削除エラー', array($id, $e));
209 209
 
210 210
                 $message = $app->trans('admin.delete.failed.foreign_key', ['%name%' => '規格分類']);
211
-                $app->addError($message, 'admin');            }
211
+                $app->addError($message, 'admin'); }
212 212
         }
213 213
 
214 214
         return $app->redirect($app->url('admin_product_class_category', array('class_name_id' => $ClassName->getId())));
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/ClassNameController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
         try {
149 149
             $this->classNameRepository->delete($ClassName);
150 150
 
151
-            $event = new EventArgs(['ClassName' => $ClassName,], $request);
151
+            $event = new EventArgs(['ClassName' => $ClassName, ], $request);
152 152
             $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_NAME_DELETE_COMPLETE, $event);
153 153
 
154 154
             $app->addSuccess('admin.class_name.delete.complete', 'admin');
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@
 block discarded – undo
242 242
             $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_PAYMENT_DELETE_COMPLETE, $event);
243 243
 
244 244
             $app->addSuccess('admin.delete.complete', 'admin');
245
-        } catch(ForeignKeyConstraintViolationException $e) {
245
+        } catch (ForeignKeyConstraintViolationException $e) {
246 246
             $this->entityManager->rollback();
247 247
 
248 248
             $message = $app->trans('admin.delete.failed.foreign_key', ['%name%' => '支払方法']);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShippingType.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@  discard block
 block discarded – undo
27 27
 use Doctrine\ORM\EntityRepository;
28 28
 use Eccube\Annotation\FormType;
29 29
 use Eccube\Annotation\Inject;
30
-use Eccube\Application;
31 30
 use Eccube\Common\Constant;
32 31
 use Eccube\Entity\BaseInfo;
33 32
 use Eccube\Form\Type\AddressType;
@@ -35,7 +34,6 @@  discard block
 block discarded – undo
35 34
 use Eccube\Form\Type\NameType;
36 35
 use Eccube\Form\Type\TelType;
37 36
 use Eccube\Form\Type\ZipType;
38
-use Eccube\Repository\BaseInfoRepository;
39 37
 use Eccube\Repository\DeliveryRepository;
40 38
 use Symfony\Bridge\Doctrine\Form\Type\EntityType;
41 39
 use Symfony\Component\Form\AbstractType;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 'prototype' => true,
200 200
             ))
201 201
 
202
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
202
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
203 203
                 if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
204 204
                     $form = $event->getForm();
205 205
                     $form->add('OrderItems', CollectionType::class, array(
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                     ));
211 211
                 }
212 212
             })
213
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
213
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
214 214
                 /** @var \Eccube\Entity\Shipping $data */
215 215
                 $data = $event->getData();
216 216
                 /** @var \Symfony\Component\Form\Form $form */
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
                     'choice_label' => 'delivery_time',
230 230
                     'placeholder' => '指定なし',
231 231
                     'required' => false,
232
-                    'query_builder' => function (EntityRepository $er) use($Delivery) {
232
+                    'query_builder' => function(EntityRepository $er) use($Delivery) {
233 233
                         return $er->createQueryBuilder('dt')
234 234
                             ->where('dt.Delivery = :Delivery')
235 235
                             ->setParameter('Delivery', $Delivery);
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                 ));
238 238
 
239 239
             })
240
-            ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
240
+            ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
241 241
                 $data = $event->getData();
242 242
                 $form = $event->getForm();
243 243
                 if (!$data) {
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
                     'choice_label' => 'delivery_time',
258 258
                     'placeholder' => '指定なし',
259 259
                     'required' => false,
260
-                    'query_builder' => function (EntityRepository $er) use($Delivery) {
260
+                    'query_builder' => function(EntityRepository $er) use($Delivery) {
261 261
                         return $er->createQueryBuilder('dt')
262 262
                             ->where('dt.Delivery = :Delivery')
263 263
                             ->setParameter('Delivery', $Delivery);
264 264
                     },
265 265
                 ));
266 266
             })
267
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
267
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
268 268
                 if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
269 269
                     $form = $event->getForm();
270 270
                     $OrderItems = $form['OrderItems']->getData();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                     }
276 276
                 }
277 277
             })
278
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
278
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
279 279
                 $Shipping = $event->getData();
280 280
                 $Delivery = $Shipping->getDelivery();
281 281
                 $Shipping->setShippingDeliveryName($Delivery ? $Delivery : null);
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/CalculateContext.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 use Eccube\Entity\Order;
5 5
 use Eccube\Entity\PurchaseInterface;
6 6
 use Eccube\Entity\OrderItem;
7
-use Eccube\Service\Calculator\Strategy\CalculateStrategyInterface;
8 7
 
9 8
 class CalculateContext
10 9
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $this->buildCalculator($this->CalculateStrategies);
24 24
 
25 25
         /** @var OrderItem $OrderItem */
26
-        foreach($this->OrderItems as $OrderItem) {
26
+        foreach ($this->OrderItems as $OrderItem) {
27 27
             if ($OrderItem instanceof OrderItem) {
28 28
                 if (!$this->Order->getItems()->contains($OrderItem)) {
29 29
                     $OrderItem->setOrder($this->Order);
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/Strategy/CalculateChargeStrategy.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -2,13 +2,9 @@
 block discarded – undo
2 2
 namespace Eccube\Service\Calculator\Strategy;
3 3
 
4 4
 use Eccube\Application;
5
-use Eccube\Entity\Master\OrderItemType;
6
-use Eccube\Entity\Master\TaxType;
7
-use Eccube\Entity\Master\TaxDisplayType;
8 5
 use Eccube\Entity\Order;
9 6
 use Eccube\Entity\PurchaseInterface;
10 7
 use Eccube\Entity\OrderItem;
11
-use Eccube\Entity\Shipping;
12 8
 use Eccube\Repository\Master\OrderItemTypeRepository;
13 9
 use Eccube\Service\Calculator\OrderItemCollection;
14 10
 
Please login to merge, or discard this patch.