Code Duplication    Length = 4-4 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Query/ReferencePrimer.php 2 locations

@@ 244-247 (lines=4) @@
241
        $class = null;
242
        $className = null;
243
244
        if ($mapping['storeAs'] === ClassMetadataInfo::REFERENCE_STORE_AS_ID) {
245
            $className = $mapping['targetDocument'];
246
            $class = $this->dm->getClassMetadata($className);
247
        }
248
249
        foreach ($persistentCollection->getMongoData() as $reference) {
250
            $id = ClassMetadataInfo::getReferenceId($reference, $mapping['storeAs']);
@@ 252-255 (lines=4) @@
249
        foreach ($persistentCollection->getMongoData() as $reference) {
250
            $id = ClassMetadataInfo::getReferenceId($reference, $mapping['storeAs']);
251
252
            if ($mapping['storeAs'] !== ClassMetadataInfo::REFERENCE_STORE_AS_ID) {
253
                $className = $this->uow->getClassNameForAssociation($mapping, $reference);
254
                $class = $this->dm->getClassMetadata($className);
255
            }
256
257
            $document = $this->uow->tryGetById($id, $class);
258