Code Duplication    Length = 7-7 lines in 2 locations

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

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