Passed
Push — master ( 9c8f70...6e49b5 )
by Luiz Kim
02:20
created
src/Service/OrderProductService.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@  discard block
 block discarded – undo
30 30
         $parentProducts = $this->manager->getRepository(OrderProduct::class)->findOneBy([
31 31
             'parentProduct'  => $orderProduct,
32 32
         ]);
33
-        foreach ($parentProducts as $parentProduct)
34
-            $this->manager->remove($parentProduct);
33
+        foreach ($parentProducts as $parentProduct) {
34
+                    $this->manager->remove($parentProduct);
35
+        }
35 36
         $this->manager->flush();
36 37
     }
37 38
 
@@ -59,8 +60,9 @@  discard block
 block discarded – undo
59 60
 
60 61
     public function __destruct()
61 62
     {
62
-        if (!$this->orderProduct)
63
-            return;
63
+        if (!$this->orderProduct) {
64
+                    return;
65
+        }
64 66
 
65 67
         $this->orderService->calculateGroupProductPrice($this->orderProduct->getOrder());
66 68
         $this->orderService->calculateOrderPrice($this->orderProduct->getOrder());
Please login to merge, or discard this patch.