Code Duplication    Length = 3-3 lines in 5 locations

lib/Doctrine/ORM/UnitOfWork.php 5 locations

@@ 597-599 (lines=3) @@
594
595
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preFlush) & ~ListenersInvoker::INVOKE_MANAGER;
596
597
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
598
            $this->listenersInvoker->invoke($class, Events::preFlush, $entity, new PreFlushEventArgs($this->em), $invoke);
599
        }
600
601
        $actualData = [];
602
@@ 903-905 (lines=3) @@
900
        $oid    = spl_object_hash($entity);
901
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::prePersist);
902
903
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
904
            $this->listenersInvoker->invoke($class, Events::prePersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
905
        }
906
907
        $idGen = $class->idGenerator;
908
@@ 1083-1085 (lines=3) @@
1080
1081
            unset($this->entityUpdates[$oid]);
1082
1083
            if ($postUpdateInvoke != ListenersInvoker::INVOKE_NONE) {
1084
                $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke);
1085
            }
1086
        }
1087
    }
1088
@@ 1123-1125 (lines=3) @@
1120
                $class->reflFields[$class->identifier[0]]->setValue($entity, null);
1121
            }
1122
1123
            if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1124
                $this->listenersInvoker->invoke($class, Events::postRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1125
            }
1126
        }
1127
    }
1128
@@ 1763-1765 (lines=3) @@
1760
            case self::STATE_MANAGED:
1761
                $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preRemove);
1762
1763
                if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1764
                    $this->listenersInvoker->invoke($class, Events::preRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1765
                }
1766
1767
                $this->scheduleForDelete($entity);
1768
                break;