Validate as integer.

@param int|string $number The integer to check
@param int        $min    The minimum integer value
@param int        $max    The maximum integer value

@return bool
1669
public function isInteger($number, int $min = null, int $max = null): bool
    {
        return isset($min) || isset($max)
            ? filter_var($number, FILTER_VALIDATE_INT, $this->getIntegerOptionsBetween($min, $max))
            : filter_var($number, FILTER_VALIDATE_INT);
    }
919979
private void verifyNumber(Number value, Number minimum, Number maximum) {

    if (minimum != null) {
      if (maximum != null) {
        assert ((value.doubleValue() >= minimum.doubleValue()) || (value.doubleValue() <= maximum.doubleValue()));
      } else {
        assert (value.doubleValue() >= minimum.doubleValue());
      }
    } else if (maximum != null) {
      assert (value.doubleValue() <= maximum.doubleValue());
    } else {
      throw new NlsNullPointerException("minimum & maximum");
    }
  }
511510
public static function isRequiredIntegerRange($value, $min, $max)
    {
        return is_int($value) && $min <= $value && $max >= $value;
    }
1372367
public function validateRange($min_amount, $max_amount)
    {
        $this->validator_attributes[] = 'data-parsley-range="[' . (float)$min_amount . ', ' . (float)$max_amount . ']"';

        $this->validator_checks['min'] = (float)$min_amount;
        $this->validator_checks['max'] = (float)$max_amount;

        return $this;
    }
1370415
public function Number($minNum = 0, $maxNum = null)
    {
        list($min, $max) = $this->resolveMinMax($minNum, $maxNum, 1000);
        return DBField::create_field("Int", rand($min, $max));
    }
784043
public static function range($value, $min, $max): int
    {
        $value = Filter::int($value);
        $min = Filter::int($min);
        $max = Filter::int($max);

        return Vars::limit($value, $min, $max);
    }
619995
protected function isSoftInteger($number)
    {
        if (!is_scalar($number) || $number === null) {
            return false;
        }
        
        $number = (string) $number;
        
        return preg_match('/^[-+]?\d+$/', $number);
    }
908840
public static Validation<Integer> range(int min, int max) {
        return greaterThan(min).and(lowerThan(max));
    }
34662
public function range($value, int $min, int $max): bool
    {
        return is_string($value)
            && (mb_strlen($trimmed = trim($value)) >= $min)
            && (mb_strlen($trimmed) <= $max);
    }
749967
public static function isOptionalNumberRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredNumberRange($value, $min, $max);
    }
504024
protected function getVerifiedCount($count, $min = 1, $max = 100)
    {
        settype($count, "integer");
        settype($min, "integer");
        settype($max, "integer");

        // If $min is greater than $max,
        // use the smallest of the two ($max)
        if ($min > $max) $min = $max;

        if ($count < $min)
        {
            $count = $min;
        }
        elseif ($count > $max)
        {
            $count = $max;
        }

        return $count;
    }
207153
public function vLimit(Int $min = 0, Int $max = NULL)
    {
        $key['minchar'] = [':p1' => $min];
        $typ['minchar'] = $min;

        if( $max !== NULL )
        {
            $key['maxchar'] = [':p1' => $max];
            $typ['maxchar'] = $max;
        }

        return $this->onInvalidEventPattern('.{' . $min . ',' . $max . '}', $key, [], $typ);
    }
909177
public static function isOptionalNumericRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredNumericRange($value, $min, $max);
    }
64900
public static function number($min = PHP_INT_MIN, $max = PHP_INT_MAX, $precision = 2)
    {
        return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $precision);
    }
1186190
public function getInt($min = 0, $max = 2147483647)
    {
        /** @noinspection TypeUnsafeComparisonInspection */
        if ($min == $max) {
            return $min;
        } else {
            $ar = unpack('l', $this->getByte(4));
            return $min + abs($ar[1]) % ($max - $min + 1);
        }
    }
1207589
public static function random_int(int $min=0, int $max=1) {
		if ($min > $max) {
			static::switcheroo($min, $max);
		}

		return \random_int($min, $max);
	}
828826
public function checkBetween($value, $min, $max)
    {
        return $this->checkMin($value, $min) && $this->checkMax($value, $max);
    }