Code Duplication    Length = 3-3 lines in 2 locations

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

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