src/Encoder/FloatEncoder.php
private function isInteger($float, $allowIntegers)
    {
        if (!$allowIntegers || round($float) !== $float) {
            return false;
        } elseif (abs($float) < self::FLOAT_MAX) {
            return true;
        }

        return $allowIntegers === 'all';
    }
private function isInteger($float, $allowIntegers)
    {
        if (!$allowIntegers || round($float) !== $float) {
            return false;
        } elseif (abs($float) < self::FLOAT_MAX) {
            return true;
        }

        return $allowIntegers === 'all';
    }
private function isInteger ( $ float , $ allowIntegers ) { if ( ! $ allowIntegers || round ( $ float ) !== $ float ) { return false ; } elseif ( abs ( $ float ) < self :: FLOAT_MAX ) { return true ; } return $ allowIntegers === 'all' ; }
Tells if the number can be encoded as an integer.
@param float $float The number to test
@param bool|string $allowIntegers Whether integers should be allowed
@return bool True if the number can be encoded as an integer, false if not
Tells if the number can be encoded as an integer .