Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 364-366 (lines=3) @@
361
362
        $keys = array();
363
364
        foreach ($xmlIndex->{'key'} as $key) {
365
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
366
        }
367
368
        $options = array();
369
@@ 472-474 (lines=3) @@
469
470
        $keys = array();
471
        $options = array();
472
        foreach ($xmlShardkey->{'key'} as $key) {
473
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
474
        }
475
476
        if (isset($attributes['unique'])) {
477
            $options['unique'] = ('true' === (string) $attributes['unique']);