src/Encoder/FloatEncoder.php
private function encodeInteger($float, callable $encode)
    {
        $minimum = \defined('PHP_INT_MIN') ? \PHP_INT_MIN : ~\PHP_INT_MAX;

        if ($float >= $minimum && $float <= \PHP_INT_MAX) {
            return $encode((int) $float);
        }

        return number_format($float, 0, '.', '');
    }
private function encodeInteger($float, callable $encode)
    {
        $minimum = \defined('PHP_INT_MIN') ? \PHP_INT_MIN : ~\PHP_INT_MAX;

        if ($float >= $minimum && $float <= \PHP_INT_MAX) {
            return $encode((int) $float);
        }

        return number_format($float, 0, '.', '');
    }
private function encodeInteger ( $ float , callable $ encode ) { $ minimum = \ defined ( 'PHP_INT_MIN' ) ? \ PHP_INT_MIN : ~ \ PHP_INT_MAX ; if ( $ float >= $ minimum && $ float <= \ PHP_INT_MAX ) { return $ encode ( ( int ) $ float ) ; } return number_format ( $ float , 0 , '.' , '' ) ; }
Encodes the given float as an integer.
@param float $float The number to encode
@param callable $encode Callback used to encode values
@return string The PHP code representation for the number
Encodes the given float as an integer .