Code Duplication    Length = 3-4 lines in 4 locations

lib/Doctrine/ODM/MongoDB/UnitOfWork.php 1 location

@@ 2312-2314 (lines=3) @@
2309
            }
2310
        }
2311
2312
        if ($this->evm->hasListeners(Events::onClear)) {
2313
            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName));
2314
        }
2315
    }
2316
2317
    /**

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataFactory.php 1 location

@@ 187-190 (lines=4) @@
184
185
        $class->setParentClasses($nonSuperclassParents);
186
187
        if ($this->evm->hasListeners(Events::loadClassMetadata)) {
188
            $eventArgs = new LoadClassMetadataEventArgs($class, $this->dm);
189
            $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
190
        }
191
    }
192
193
    /**

lib/Doctrine/ODM/MongoDB/Hydrator/HydratorFactory.php 2 locations

@@ 444-446 (lines=3) @@
441
            $args = array(new PreLoadEventArgs($document, $this->dm, $data));
442
            $metadata->invokeLifecycleCallbacks(Events::preLoad, $document, $args);
443
        }
444
        if ($this->evm->hasListeners(Events::preLoad)) {
445
            $this->evm->dispatchEvent(Events::preLoad, new PreLoadEventArgs($document, $this->dm, $data));
446
        }
447
448
        // alsoLoadMethods may transform the document before hydration
449
        if ( ! empty($metadata->alsoLoadMethods)) {
@@ 479-481 (lines=3) @@
476
        if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) {
477
            $metadata->invokeLifecycleCallbacks(Events::postLoad, $document, array(new LifecycleEventArgs($document, $this->dm)));
478
        }
479
        if ($this->evm->hasListeners(Events::postLoad)) {
480
            $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm));
481
        }
482
483
        return $data;
484
    }