Yosymfony\Toml\Parser::getFloat PHP Méthode

getFloat() private méthode

private getFloat ( Yosymfony\Toml\Token $token )
$token Yosymfony\Toml\Token
    private function getFloat(Token $token)
    {
        $value = $token->getValue();
        if (preg_match('/([^\\d]_[^\\d])|_[eE]|[eE]_|(_$)/', $value)) {
            throw new ParseException('Invalid float number: underscore must be surrounded by at least one digit', $this->currentLine, $token->getValue());
        }
        $value = str_replace('_', '', $value);
        if (preg_match('/^0\\d+/', $value)) {
            throw new ParseException('Invalid float number: leading zeros are not allowed', $this->currentLine, $token->getValue());
        }
        return (double) $value;
    }