Passed
Push — master ( 88488f...64909c )
by Luiz Kim
02:33
created
src/Listener/DefaultEventListener.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $this->ExtraDataService->discoveryUser($entity);
29 29
         $newEntity = $this->execute($entity, 'prePersist');
30 30
         if ($newEntity && $newEntity !== $entity)
31
-            $this->replaceEntity($newEntity,  $entity);
31
+            $this->replaceEntity($newEntity, $entity);
32 32
     }
33 33
 
34 34
     public function postUpdate(LifecycleEventArgs $args)
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
         $this->ExtraDataService->discoveryDevice($entity);
28 28
         $this->ExtraDataService->discoveryUser($entity);
29 29
         $newEntity = $this->execute($entity, 'prePersist');
30
-        if ($newEntity && $newEntity !== $entity)
31
-            $this->replaceEntity($newEntity,  $entity);
30
+        if ($newEntity && $newEntity !== $entity) {
31
+                    $this->replaceEntity($newEntity,  $entity);
32
+        }
32 33
     }
33 34
 
34 35
     public function postUpdate(LifecycleEventArgs $args)
@@ -67,10 +68,12 @@  discard block
 block discarded – undo
67 68
             $service = $this->container->get($serviceName);
68 69
             if (method_exists($service, $method)) {
69 70
                 $newEntity = $service->$method($entity);
70
-                if ('prePersist' === $method && $newEntity)
71
-                    return $newEntity;
72
-                if ('postPersist' === $method && $newEntity)
73
-                    $this->manager->refresh($newEntity);
71
+                if ('prePersist' === $method && $newEntity) {
72
+                                    return $newEntity;
73
+                }
74
+                if ('postPersist' === $method && $newEntity) {
75
+                                    $this->manager->refresh($newEntity);
76
+                }
74 77
             }
75 78
         }
76 79
         return $entity;
Please login to merge, or discard this patch.