Code Duplication    Length = 4-4 lines in 2 locations

lib/Doctrine/ODM/MongoDB/Mapping/Driver/XmlDriver.php 2 locations

@@ 250-253 (lines=4) @@
247
        if (isset($attributes['fieldName'])) {
248
            $mapping['fieldName'] = (string) $attributes['fieldName'];
249
        }
250
        if (isset($embed->{'discriminator-field'})) {
251
            $attr = $embed->{'discriminator-field'};
252
            $mapping['discriminatorField'] = (string) $attr['name'];
253
        }
254
        if (isset($embed->{'discriminator-map'})) {
255
            foreach ($embed->{'discriminator-map'}->{'discriminator-mapping'} as $discriminatorMapping) {
256
                $attr = $discriminatorMapping->attributes();
@@ 300-303 (lines=4) @@
297
        if (isset($attributes['fieldName'])) {
298
            $mapping['fieldName'] = (string) $attributes['fieldName'];
299
        }
300
        if (isset($reference->{'discriminator-field'})) {
301
            $attr = $reference->{'discriminator-field'};
302
            $mapping['discriminatorField'] = (string) $attr['name'];
303
        }
304
        if (isset($reference->{'discriminator-map'})) {
305
            foreach ($reference->{'discriminator-map'}->{'discriminator-mapping'} as $discriminatorMapping) {
306
                $attr = $discriminatorMapping->attributes();