Code Duplication    Length = 4-4 lines in 2 locations

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

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