Checks if the given value is in the given increments of range.

@param string $increments
@param string $value

@return Boolean
6316
protected function isInIncrementsOfRange($increments, $value)
    {
        $incrementsParts = explode('/', $increments);

        if ('*' === $incrementsParts[0]) {
            return (int) $value % $incrementsParts[1] === 0;
        }

        if (!$this->isInRange($incrementsParts[0], $value)) {
            return false;
        }

        $rangeParts = explode('-', $incrementsParts[0]);

        for ($i = $rangeParts[0]; $i <= $rangeParts[1]; $i += $incrementsParts[1]) {
            if ($i == $value) {
                return true;
            }
        }

        return false;
    }
610735
private function isInt(string $value): bool
    {
        return \is_numeric($value) && (float)\round($value, 0) === (float)$value;
    }
1173614
protected function isSequence($value)
    {
        if (!Helper::isSequential($value)) {
            return false;
        }

        if ($value === []) {
            return true;
        }

        $i=0;

        $lastItemType = null;

        foreach ($value as $key=>$item) {

            if ($key !== $i) {
                return false;
            }

            $itemType = Type::of($item);

            // TODO: list could be typed by common class or interface
            if ($i !== 0 && $itemType != $lastItemType) {
                return false;
            }

            $lastItemType = $itemType;
            $i++;
        }

        return true;

    }
312228
public function containsValue($value): bool {
        $node = $this->getHead();
        while ($node !== null) {
            if (Comparator::equals($node->getValue(), $value)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
162359
public function increment($value = 1)
    {
        $this->percent += $value;

        $percentage = (double)($this->percent / 100);

        $progress = floor($percentage * 50);
        $output = "\r[" . str_repeat('>', $progress);
        if ($progress < 50) {
            $output .= ">" . str_repeat(' ', 50 - $progress);
        } else {
            $output .= '>';
        }
        $output .= sprintf('] %s%% ', round($percentage * 100, 0));

        $speed = (time() - $this->startTime) / $this->percent;
        $remaining = number_format(round($speed * (100 - $this->percent), 2), 2);
        $percentage == 100 || $output .= " $remaining seconds remaining";

        Output::write($output);
        return $this;
    }
114774
public function isInIncrementsOfRanges($dateValue, $value)
    {
        $chunks = array_map('trim', explode('/', $value, 2));
        $range = $chunks[0];
        $step = isset($chunks[1]) ? $chunks[1] : 0;

        // No step or 0 steps aren't cool
        if (is_null($step) || '0' === $step || 0 === $step) {
            return false;
        }

        // Expand the * to a full range
        if ('*' == $range) {
            $range = $this->rangeStart . '-' . $this->rangeEnd;
        }

        // Generate the requested small range
        $rangeChunks = explode('-', $range, 2);
        $rangeStart = $rangeChunks[0];
        $rangeEnd = isset($rangeChunks[1]) ? $rangeChunks[1] : $rangeStart;

        if ($rangeStart < $this->rangeStart || $rangeStart > $this->rangeEnd || $rangeStart > $rangeEnd) {
            throw new \OutOfRangeException('Invalid range start requested');
        }

        if ($rangeEnd < $this->rangeStart || $rangeEnd > $this->rangeEnd || $rangeEnd < $rangeStart) {
            throw new \OutOfRangeException('Invalid range end requested');
        }

        if ($step > ($rangeEnd - $rangeStart) + 1) {
            throw new \OutOfRangeException('Step cannot be greater than total range');
        }

        $thisRange = range($rangeStart, $rangeEnd, $step);

        return in_array($dateValue, $thisRange);
    }
1121322
public function incrementMemberCount($value){
        if(!is_integer($value)){
            return $this;
        }
        $this->count_members = $this->count_members + $value;
        return $this;
    }
11936
public function isValid($value)
    {
        $this->_setValue($value);

        if (!is_numeric($value)) {
            return false;
        }

        $value = (float)$value;
        return $value >= 0 && $value <= 1;
    }
218562
public static function rangeNumber($value, $minNumber, $maxNumber): bool
    {
        if (!is_numeric($value)) {
            return false;
        }

        if ($value < $minNumber) {
            return false;
        }
        if ($value > $maxNumber) {
            return false;
        }

        return true;
    }
917290
public function containsValue($value): bool {
        TypeHelper::validateValue($value, $this);
        foreach ($this as $v) {
            if ($value == $v) {
                return true;
            }
        }

        return false;
    }
66257
public function hasValue($value)
    {
        $index = array_search($value, $this->values);

        if ($index === false) {
            return false;
        }

        return true;
    }
447416
public function isInIncrementsOfRanges($dateValue, $value)
    {
        $parts = array_map('trim', explode('/', $value, 2));
        $stepSize = isset($parts[1]) ? (int) $parts[1] : 0;

        if ($stepSize === 0) {
            return false;
        }

        if (($parts[0] == '*' || $parts[0] === '0')) {
            return (int) $dateValue % $stepSize == 0;
        }

        $range = explode('-', $parts[0], 2);
        $offset = $range[0];
        $to = isset($range[1]) ? $range[1] : $dateValue;
        // Ensure that the date value is within the range
        if ($dateValue < $offset || $dateValue > $to) {
            return false;
        }

        if ($dateValue > $offset && 0 === $stepSize) {
          return false;
        }

        for ($i = $offset; $i <= $to; $i+= $stepSize) {
            if ($i == $dateValue) {
                return true;
            }
        }

        return false;
    }
461532
final public static function hasNumber ($value, array $options=[]) : bool
	{
		if (!self::hasValue($value))  new ErrorCode(1001);

		// Submitted values are strings, so use is_numeric instead of is_int
		if (!is_numeric($value)) return FALSE;

		if (!empty($options)) return static::hasLength($value, $options);

		return TRUE;
	}
1110664
public static function isRequiredNumberRange($value, $min, $max)
    {
        return (is_int($value) || is_float($value)) && $min <= $value && $max >= $value;
    }
1105041
public static function range($value, array $param)
    {
        return is_numeric($value) ? ($value >= $param[0] && $value <= $param[1]) : false;
    }
77316
public static function isFiniteNumber($value)
    {
        if (!(is_int($value) || is_float($value))) {
            return false;
        }

        if (is_nan($value) || is_infinite($value)) {
            return false;
        }

        if (abs($value) > pow(2, 53)) {
            return false;
        }

        return true;
    }
633900
public function maybeInSet($value)
    {
        foreach ($this->positions($value) as $position) {
            if (!$this->getBitAtPosition($position)) {
                return false;
            }
        }
        return true;
    }