Code Duplication    Length = 3-4 lines in 4 locations

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

@@ 170-173 (lines=4) @@
167
168
        $class->setParentClasses($nonSuperclassParents);
169
170
        if ($this->evm->hasListeners(Events::loadClassMetadata)) {
171
            $eventArgs = new LoadClassMetadataEventArgs($class, $this->dm);
172
            $this->evm->dispatchEvent(Events::loadClassMetadata, $eventArgs);
173
        }
174
    }
175
176
    /**

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

@@ 2251-2253 (lines=3) @@
2248
            }
2249
        }
2250
2251
        if ($this->evm->hasListeners(Events::onClear)) {
2252
            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName));
2253
        }
2254
    }
2255
2256
    /**

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

@@ 421-423 (lines=3) @@
418
            $args = array(new PreLoadEventArgs($document, $this->dm, $data));
419
            $metadata->invokeLifecycleCallbacks(Events::preLoad, $document, $args);
420
        }
421
        if ($this->evm->hasListeners(Events::preLoad)) {
422
            $this->evm->dispatchEvent(Events::preLoad, new PreLoadEventArgs($document, $this->dm, $data));
423
        }
424
425
        // alsoLoadMethods may transform the document before hydration
426
        if ( ! empty($metadata->alsoLoadMethods)) {
@@ 456-458 (lines=3) @@
453
        if ( ! empty($metadata->lifecycleCallbacks[Events::postLoad])) {
454
            $metadata->invokeLifecycleCallbacks(Events::postLoad, $document, array(new LifecycleEventArgs($document, $this->dm)));
455
        }
456
        if ($this->evm->hasListeners(Events::postLoad)) {
457
            $this->evm->dispatchEvent(Events::postLoad, new LifecycleEventArgs($document, $this->dm));
458
        }
459
460
        return $data;
461
    }