Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 350-352 (lines=3) @@
347
348
        $keys = array();
349
350
        foreach ($xmlIndex->{'key'} as $key) {
351
            $keys[(string) $key['name']] = isset($key['order']) ? (string) $key['order'] : 'asc';
352
        }
353
354
        $options = array();
355
@@ 458-460 (lines=3) @@
455
456
        $keys = array();
457
        $options = array();
458
        foreach ($xmlShardkey->{'key'} as $key) {
459
            $keys[(string) $key['name']] = isset($key['order']) ? (string)$key['order'] : 'asc';
460
        }
461
462
        if (isset($attributes['unique'])) {
463
            $options['unique'] = ('true' === (string) $attributes['unique']);