public static function bound($number, $min = 0, $max = PHP_INT_MAX)
    {
        $number = (int)$number;
        $min = (int)$min;
        $max = (int)$max;

        return min(max($number, $min), $max);
    }