range

@param int  $min
@param int  $max
@param bool $addFilter
@param bool $forceInt

@return  $this

@since  3.4.2
167369
public function range($min, $max, $addFilter = true, $forceInt = false)
    {
        if ($addFilter) {
            $this->addFilter(new RangeFilter($min, $max, $forceInt));
        }

        $this->min($min, false)
            ->max($max, false);

        return $this;
    }
864496
public function clip(float $min, float $max) : self
    {
        if ($min > $max) {
            throw new InvalidArgumentException('Minimum cannot be'
                . ' greater than maximum.');
        }

        $b = [];

        foreach ($this->a as $value) {
            if ($value > $max) {
                $b[] = $max;

                continue 1;
            }

            if ($value < $min) {
                $b[] = $min;

                continue 1;
            }

            $b[] = $value;
        }

        return static::quick($b);
    }
331905
function assetFileSize($min = null, $max = null) {
        $range = [];
        if ($min) $range['min'] = $min;
        if ($max) $range['max'] = $max;
        if (count($range)) $this->data['assetFileSize'] = $range;
        return $this;
    }
446984
public static function rangeCount($value, int $minCount, int $maxCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        $count = count($value);

        if ($count < $minCount) {
            return false;
        }
        if ($count > $maxCount) {
            return false;
        }

        return true;
    }
806233
public function applyFilterRange(Filter\FilterRange $filter)
	{
		$conditions = $filter->getCondition();

		$value_from = $conditions[$filter->getColumn()]['from'];
		$value_to = $conditions[$filter->getColumn()]['to'];

		if ($value_from || $value_from != '') {
			$this->data_source->where('%n >= ?', $filter->getColumn(), $value_from);
		}

		if ($value_to || $value_to != '') {
			$this->data_source->where('%n <= ?', $filter->getColumn(), $value_to);
		}
	}
1149823
public static int[] range(int min, int max) {
    int[] range = new int[max - min];
    for (int i = 0; i < (max - min); i++) {
      range[i] = i + min;
    }
    return range;
  }
496179
public static function isOptionalIntegerRange($value, $min, $max)
    {
        /* No additional validations when the value is null. */
        if (null === $value) {

            return true;
        }

        return self::isRequiredIntegerRange($value, $min, $max);
    }
1341303
public function limitSize($max) {
		// if the maximum is not numeric
		if(is_numeric($max)) {
			// set maximum
			$this->Limits->Size = intval($max);
		}
		// return self
		return($this);
	}
848334
public function setFilterRange($attribute, $min, $max, $exclude = false)
    {
        $this->sphinx->SetFilterRange($attribute, $min, $max, $exclude);
    }
96291
function SetIDRange ( $min, $max )
    {
        assert ( is_numeric($min) );
        assert ( is_numeric($max) );
        assert ( $min<=$max );
        $this->_min_id = $min;
        $this->_max_id = $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);
    }
1335459
public function setMax($max)
  {
    if (!is_numeric($max))
    {
      $max = null;
    }
    $this->max = $max;

    return $this;
  }
785237
public function setFilterFloatRange($attribute, $min, $max, $exclude = false)
    {
        $this->sphinx->SetFilterFloatRange($attribute, $min, $max, $exclude);
    }
463410
public static function range($value, $min, $max)
    {
        return Validator::int()->between($min, $max)->validate($value);
    }
1324958
public static function in_range($value, $min=null, $max=null) {
		return sanitize::to_range($value, $min, $max) === $value;
	}
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);
    }
1064054
public function length($min, $max = null) {
        if (!$this->_isValid) {
            return $this;
        }
        $length = mb_strlen($this->_unsafeVar, $this->conf['encoding']);
        if ($length < $min || (!is_null($max) && $length > $max)) {
            $this->_isValid = false;
        }
        return $this;
    }