Code Duplication    Length = 4-4 lines in 2 locations

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

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