protected function parseValue($value)
    {
        if ($this->isQuoted($value)) {
            return trim(preg_replace(static::ESCAPED_QUOTE_PATTERN, '\1', $value), static::QUOTE_CHARS);
        } elseif ($this->opensQuote($value)) {
            $value = $this->parseMultilineValue(ltrim($value, static::QUOTE_CHARS));
            if ($value === false) {
                throw new \RuntimeException('Error parsing ini.');
            }

            return $value;
        } elseif (is_numeric($value)) {
            if (strpos($value, '.') !== false) {
                return floatval($value);
            }
            return intval($value);
        } elseif (in_array(strtolower($value), ['true', 'false'])) {
            return (strtolower($value) === 'true');
        } else {
            return $value;
        }
    }