Code Duplication    Length = 7-7 lines in 2 locations

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

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