Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 365-371 (lines=7) @@
362
        if (isset($xmlIndex->{'option'})) {
363
            foreach ($xmlIndex->{'option'} as $option) {
364
                $value = (string) $option['value'];
365
                if ($value === 'true') {
366
                    $value = true;
367
                } elseif ($value === 'false') {
368
                    $value = false;
369
                } elseif (is_numeric($value)) {
370
                    $value = preg_match('/^[-]?\d+$/', $value) ? (integer) $value : (float) $value;
371
                }
372
                $options[(string) $option['name']] = $value;
373
            }
374
        }
@@ 425-431 (lines=7) @@
422
                $value = trim((string) $field['value']);
423
            }
424
425
            if ($value === 'true') {
426
                $value = true;
427
            } elseif ($value === 'false') {
428
                $value = false;
429
            } elseif (is_numeric($value)) {
430
                $value = preg_match('/^[-]?\d+$/', $value) ? (integer) $value : (float) $value;
431
            }
432
433
            $partialFilterExpression[(string) $field['name']] = $operator ? ['$' . $operator => $value] : $value;
434
        }