Code Duplication    Length = 4-4 lines in 2 locations

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

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