Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 358-360 (lines=3) @@
355
356
        $keys = array();
357
358
        foreach ($xmlIndex->{'key'} as $key) {
359
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
360
        }
361
362
        $options = array();
363
@@ 466-468 (lines=3) @@
463
464
        $keys = array();
465
        $options = array();
466
        foreach ($xmlShardkey->{'key'} as $key) {
467
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
468
        }
469
470
        if (isset($attributes['unique'])) {
471
            $options['unique'] = ('true' === (string) $attributes['unique']);