Code Duplication    Length = 3-3 lines in 2 locations

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

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