Code Duplication    Length = 3-3 lines in 2 locations

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

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