Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 348-350 (lines=3) @@
345
346
        $keys = array();
347
348
        foreach ($xmlIndex->{'key'} as $key) {
349
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
350
        }
351
352
        $options = array();
353
@@ 456-458 (lines=3) @@
453
454
        $keys = array();
455
        $options = array();
456
        foreach ($xmlShardkey->{'key'} as $key) {
457
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
458
        }
459
460
        if (isset($attributes['unique'])) {
461
            $options['unique'] = ('true' === (string) $attributes['unique']);