Code Duplication    Length = 3-3 lines in 5 locations

lib/Doctrine/ORM/UnitOfWork.php 5 locations

@@ 574-576 (lines=3) @@
571
572
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preFlush) & ~ListenersInvoker::INVOKE_MANAGER;
573
574
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
575
            $this->listenersInvoker->invoke($class, Events::preFlush, $entity, new PreFlushEventArgs($this->em), $invoke);
576
        }
577
578
        $actualData = [];
579
@@ 880-882 (lines=3) @@
877
        $oid    = spl_object_hash($entity);
878
        $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::prePersist);
879
880
        if ($invoke !== ListenersInvoker::INVOKE_NONE) {
881
            $this->listenersInvoker->invoke($class, Events::prePersist, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
882
        }
883
884
        $idGen = $class->idGenerator;
885
@@ 1060-1062 (lines=3) @@
1057
1058
            unset($this->entityUpdates[$oid]);
1059
1060
            if ($postUpdateInvoke != ListenersInvoker::INVOKE_NONE) {
1061
                $this->listenersInvoker->invoke($class, Events::postUpdate, $entity, new LifecycleEventArgs($entity, $this->em), $postUpdateInvoke);
1062
            }
1063
        }
1064
    }
1065
@@ 1100-1102 (lines=3) @@
1097
                $class->reflFields[$class->identifier[0]]->setValue($entity, null);
1098
            }
1099
1100
            if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1101
                $this->listenersInvoker->invoke($class, Events::postRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1102
            }
1103
        }
1104
    }
1105
@@ 1740-1742 (lines=3) @@
1737
            case self::STATE_MANAGED:
1738
                $invoke = $this->listenersInvoker->getSubscribedSystems($class, Events::preRemove);
1739
1740
                if ($invoke !== ListenersInvoker::INVOKE_NONE) {
1741
                    $this->listenersInvoker->invoke($class, Events::preRemove, $entity, new LifecycleEventArgs($entity, $this->em), $invoke);
1742
                }
1743
1744
                $this->scheduleForDelete($entity);
1745
                break;