public function transform($value): string
    {
        if (null === $value || '' === $value) {
            return '';
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric or null.');
        }

        if ($value >= PHP_INT_MAX || $value <= -PHP_INT_MAX) {
            throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.');
        }

        return (string) $this->round($value);
    }
public function transform($value): string
    {
        if (null === $value || '' === $value) {
            return '';
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric or null.');
        }

        if ($value >= PHP_INT_MAX || $value <= -PHP_INT_MAX) {
            throw new TransformationFailedException('I don\'t have a clear idea what infinity looks like.');
        }

        return (string) $this->round($value);
    }
public function transform ( $ value ) : string { if ( null === $ value || '' === $ value ) { return '' ; } if ( ! is_numeric ( $ value ) ) { throw new TransformationFailedException ( 'Expected a numeric or null.' ) ; } if ( $ value >= PHP_INT_MAX || $ value <= - PHP_INT_MAX ) { throw new TransformationFailedException ( 'I don\'t have a clear idea what infinity looks like.' ) ; } return ( string ) $ this -> round ( $ value ) ; }
Transforms a number type into number.

@param int|float|string|null $value Number value

@throws TransformationFailedException If the given value is not numeric
or if the value can not be transformed
Transforms a number type into number .