Code Duplication    Length = 7-8 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataInfo.php 2 locations

@@ 1318-1324 (lines=7) @@
1315
            $mapping['simple'] = $mapping['storeAs'] === ClassMetadataInfo::REFERENCE_STORE_AS_ID;
1316
        }
1317
1318
        if (isset($mapping['reference'])
1319
            && isset($mapping['storeAs'])
1320
            && $mapping['storeAs'] === ClassMetadataInfo::REFERENCE_STORE_AS_ID
1321
            && ! isset($mapping['targetDocument'])
1322
        ) {
1323
            throw MappingException::simpleReferenceRequiresTargetDocument($this->name, $mapping['fieldName']);
1324
        }
1325
1326
        if (isset($mapping['reference'])
1327
            && isset($mapping['storeAs'])
@@ 1326-1333 (lines=8) @@
1323
            throw MappingException::simpleReferenceRequiresTargetDocument($this->name, $mapping['fieldName']);
1324
        }
1325
1326
        if (isset($mapping['reference'])
1327
            && isset($mapping['storeAs'])
1328
            && $mapping['storeAs'] === ClassMetadataInfo::REFERENCE_STORE_AS_ID
1329
            && isset($mapping['redundantFields'])
1330
            && $mapping['redundantFields'] !== []
1331
        ) {
1332
            throw MappingException::simpleReferenceCannotHaveRedundantFields($this->name, $mapping['fieldName']);
1333
        }
1334
1335
        if (isset($mapping['reference']) && empty($mapping['targetDocument']) && empty($mapping['discriminatorMap']) &&
1336
                (isset($mapping['mappedBy']) || isset($mapping['inversedBy']))) {