Code Duplication    Length = 3-3 lines in 5 locations

lib/Doctrine/ORM/UnitOfWork.php 5 locations

@@ 599-601 (lines=3) @@
596
597
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preFlush) & ~ListenersInvoker::INVOKE_MANAGER;
598
599
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
600
            $this->listenersInvoker->invoke($class, Events::preFlush, $entity, new PreFlushEventArgs($this->em), $invoke);
601
        }
602
603
        $actualData = array();
604
@@ 905-907 (lines=3) @@
902
        $oid    = spl_object_hash($entity);
903
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::prePersist);
904
905
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
906
            $this->listenersInvoker->invoke($class, Events::prePersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
907
        }
908
909
        $idGen = $class->idGenerator;
910
@@ 1084-1086 (lines=3) @@
1081
1082
            unset($this->entityUpdates[$oid]);
1083
1084
            if ($postUpdateInvoke != ListenersInvoker::INVOKE_NONE) {
1085
                $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke);
1086
            }
1087
        }
1088
    }
1089
@@ 1124-1126 (lines=3) @@
1121
                $class->reflFields[$class->identifier[0]]->setValue($entity, null);
1122
            }
1123
1124
            if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1125
                $this->listenersInvoker->invoke($class, Events::postRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1126
            }
1127
        }
1128
    }
1129
@@ 1772-1774 (lines=3) @@
1769
            case self::STATE_MANAGED:
1770
                $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preRemove);
1771
1772
                if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1773
                    $this->listenersInvoker->invoke($class, Events::preRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1774
                }
1775
1776
                $this->scheduleForDelete($entity);
1777
                break;