Code Duplication    Length = 3-3 lines in 5 locations

lib/Doctrine/ORM/UnitOfWork.php 5 locations

@@ 613-615 (lines=3) @@
610
611
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preFlush) & ~ListenersInvoker::INVOKE_MANAGER;
612
613
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
614
            $this->listenersInvoker->invoke($class, Events::preFlush, $entity, new PreFlushEventArgs($this->em), $invoke);
615
        }
616
617
        $actualData = [];
618
@@ 928-930 (lines=3) @@
925
        $oid    = spl_object_hash($entity);
926
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::prePersist);
927
928
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
929
            $this->listenersInvoker->invoke($class, Events::prePersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
930
        }
931
932
        $idGen = $class->idGenerator;
933
@@ 1108-1110 (lines=3) @@
1105
1106
            unset($this->entityUpdates[$oid]);
1107
1108
            if ($postUpdateInvoke != ListenersInvoker::INVOKE_NONE) {
1109
                $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke);
1110
            }
1111
        }
1112
    }
1113
@@ 1148-1150 (lines=3) @@
1145
                $class->reflFields[$class->identifier[0]]->setValue($entity, null);
1146
            }
1147
1148
            if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1149
                $this->listenersInvoker->invoke($class, Events::postRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1150
            }
1151
        }
1152
    }
1153
@@ 1788-1790 (lines=3) @@
1785
            case self::STATE_MANAGED:
1786
                $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preRemove);
1787
1788
                if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1789
                    $this->listenersInvoker->invoke($class, Events::preRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1790
                }
1791
1792
                $this->scheduleForDelete($entity);
1793
                break;