Bar::setMax

@param int $number

@return static
161863
public function setMax($number)
    {
        $this->max = (int)$number;
        $this->attributes->addAttribute('aria-valuemax', $this->max);

        return $this;
    }
983653
public function toTheN($number)
    {
        for ($i = 1; $i <= $number; $i++) {
            $this->multiply($this->number);
        }

        return $this;
    }
1009168
public function skip($number)
    {
        $this->iterator = Iterators::skip($this->iterator, $number);
        return $this;
    }
767619
public function blockLimit($number = null)
    {
        $number = $number !== null ? intval($number) : $number;
        $this->_blockLimit = $number;

        return $this;
    }
68614
public function setMax($max)
    {
        $max = (int) $max;

        if ($max < 0) {
            throw new \InvalidArgumentException('Error: Maximum cannot be smaller than zero');
        }
        if ($max < $this->min) {
            // We do not throw an exception but silently adjust the minimum.
            $this->min = $max;
        }

        $this->max = $max;
    }
1185043
public function lastsMutable(int $number = null): self
    {
        if ($this->isEmpty()) {
            return $this;
        }

        if ($number === null) {
            $poppedValue = $this->last();

            if ($poppedValue === null) {
                $poppedValue = [$poppedValue];
            } else {
                $poppedValue = (array) $poppedValue;
            }

            $this->array = static::create(
                $poppedValue,
                $this->iteratorClass,
                false
            )->getArray();
        } else {
            $number = (int) $number;
            $this->array = $this->rest(-$number)->getArray();
        }

        $this->generator = null;

        return $this;
    }
1075130
public function setParcelNumber($number)
    {
        $this->set(Config::T8904, (string)$number);
        $this->set(Config::T8973, (string)$number);

        return $this;
    }
264042
public function max(...$numbers)
    {
        foreach ($numbers as $number) {
            if (bccomp(static::validateInputNumber($number), $this->number, $this->precision) === 1) {
                $this->number = $number;
            }
        }

        return $this;
    }
56807
function exclusiveRange($min = null, $max = null)
	{
		$this->exclusiveMin($min);
		$this->exclusiveMax($max);
		return $this;
	}
959961
public function setPatch($number)
    {
        if (!Validator::isNumber($number)) {
            throw new InvalidNumberException($number);
        }

        $this->patch = intval($number);

        return $this;
    }
204918
public function setLimit($limit) {
        if (!is_numeric($limit) || $limit < 0) {
            throw new \InvalidArgumentException("Invalid limit '$limit.'", 500);
        }

        $this->limit = (int)$limit;
        return $this;
    }
886578
public function max($max)
    {
        if (isset($this->min) && $this->min > $max) {
            throw new \InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s)', $max, $this->min));
        }
        $this->max = $max;

        return $this;
    }
806804
public function setMax($max)
    {
        if ($max <= 0) {
            throw new InvalidArgumentException(sprintf('Supplied max value: %d must be greater than 0', $max));
        }
        $this->max = $max;
        return $this;
    }
155510
public function firstsMutable(int $number = null): self
    {
        $this->generatorToArray();

        if ($number === null) {
            $this->array = (array) \array_shift($this->array);
        } else {
            $number = (int) $number;
            $this->array = \array_splice($this->array, 0, $number);
        }

        return $this;
    }
718147
public function setLimit($limit)
    {
        if ($limit < 1 || !is_int($limit)) {
            throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);
        }
        $this->limit = $limit;

        return $this;
    }
614479
public function max($max) {
        $this->check_role = 'max';
        $this->p1 = $max;
        $result = $this->value <= $max;
        $this->checkResult($result);
        return $this;
    }
1256924
public function min(...$numbers)
    {
        foreach ($numbers as $number) {
            if (bccomp(static::validateInputNumber($number), $this->number, $this->precision) === -1) {
                $this->number = $number;
            }
        }

        return $this;
    }