Code Duplication    Length = 7-7 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-1332 (lines=7) @@
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
            && ! empty($mapping['redundantFields'])
1330
        ) {
1331
            throw MappingException::simpleReferenceCannotHaveRedundantFields($this->name, $mapping['fieldName']);
1332
        }
1333
1334
        if (isset($mapping['reference']) && empty($mapping['targetDocument']) && empty($mapping['discriminatorMap']) &&
1335
                (isset($mapping['mappedBy']) || isset($mapping['inversedBy']))) {