Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 345-347 (lines=3) @@
342
343
        $keys = array();
344
345
        foreach ($xmlIndex->{'key'} as $key) {
346
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
347
        }
348
349
        $options = array();
350
@@ 453-455 (lines=3) @@
450
451
        $keys = array();
452
        $options = array();
453
        foreach ($xmlShardkey->{'key'} as $key) {
454
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
455
        }
456
457
        if (isset($attributes['unique'])) {
458
            $options['unique'] = ('true' === (string) $attributes['unique']);