src/Forms/Transformers/ChoiceToValueTransformer.php
protected function parseNumeric($value)
    {
        if (is_numeric($value)) {
            if (false !== strrpos($value, '.')) {
                return (float) $value;
            }

            return (int) $value;
        }

        return $value;
    }
protected function parseNumeric($value)
    {
        if (is_numeric($value)) {
            if (false !== strrpos($value, '.')) {
                return (float) $value;
            }

            return (int) $value;
        }

        return $value;
    }
protected function parseNumeric ( $ value ) { if ( is_numeric ( $ value ) ) { if ( false !== strrpos ( $ value , '.' ) ) { return ( float ) $ value ; } return ( int ) $ value ; } return $ value ; }
Parse if a value is numeric and cast it
to its correct type.

@param string $value

@return float|int
Parse if a value is numeric and cast it to its correct type .