Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 372-374 (lines=3) @@
369
370
        $keys = array();
371
372
        foreach ($xmlIndex->{'key'} as $key) {
373
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
374
        }
375
376
        $options = array();
377
@@ 480-482 (lines=3) @@
477
478
        $keys = array();
479
        $options = array();
480
        foreach ($xmlShardkey->{'key'} as $key) {
481
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
482
        }
483
484
        if (isset($attributes['unique'])) {
485
            $options['unique'] = ('true' === (string) $attributes['unique']);