Set the update check interval.

@throws \InvalidArgumentDescription if the update check interval is unknown

@param string $interval
183247
public function setUpdateCheck($interval)
    {
        $validIntervals = [
            Checker::ALWAYS,
            Checker::DAILY,
            Checker::WEEKLY,
            Checker::MONTHLY,
            Checker::NEVER,
        ];

        if (!\in_array($interval, $validIntervals)) {
            throw new \InvalidArgumentException('invalid update check interval: ' . $interval);
        }

        $this->updateCheck = $interval;
    }
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;
    }
930271
protected function setError(int $error)
    {
        if (false === \in_array($error, self::$errors, true))
        {
            throw new InvalidArgumentException('Invalid error status for UploadedFile');
        }

        $this->error = $error;
    }
1099929
@ReflectiveAccess
    protected void setInterval(String interval) {
        this.interval = ConversionService.SHARED.convert(interval, Duration.class).orElseThrow(() -> new IllegalArgumentException("Invalid Duration Specified"));
    }
351017
protected function setupHeartbeat($interval)
    {
        $this->heartbeatInterval = $interval;
        if (isset($this->heartbeatTimer)) {
            $this->heartbeatTimer->cancel();
        }

        $interval             = $interval / 1000;
        $this->heartbeatTimer = $this->loop->addPeriodicTimer($interval, [$this, 'heartbeat']);
        $this->heartbeat();

        $this->logger->info('heartbeat timer initilized', ['interval' => $interval * 1000]);
    }
313637
protected function setDetail($detail)
    {
        if (0 === strlen(trim($detail))) {
            throw new \InvalidArgumentException('Provided error message cannot be empty');
        }

        $this->detail = (string) $detail;
    }
985506
public function setLevel($level)
    {
        if (!isset(self::$levels[$level])) {
            throw new \InvalidArgumentException('Invalid log level');
        }
        $this->level = $level;
    }
16849
def set_interval(self, interval):
        
        if type(interval) != float or type(interval) != int:
            raise InvalidInput("Interval value must be of float or int")
        self._config['interval']
817359
protected static function intervalHasTime(DateInterval $interval)
    {
        // The array_key_exists and get_object_vars are used as a workaround to check microsecond support.
        // Both isset and property_exists will fail on PHP 7.0.14 - 7.0.21 due to the following bug:
        // https://bugs.php.net/bug.php?id=74852
        return $interval->h || $interval->i || $interval->s || array_key_exists('f', get_object_vars($interval)) && $interval->f;
    }
590748
public function setMax(int $max): void{
        if($this->min > $max){
            throw new \InvalidArgumentException();
        }

        $this->max  = $max;
    }
96580
public function setStability($stability)
    {
        if (!in_array($stability, self::$stabilities, true)) {
            throw new InvalidArgumentException(
                'Invalid stability value. Must be one of "stable", "unstable" or "any".'
            );
        }

        $this->stability = $stability;
    }
974621
protected function setQuery($query)
    {
        if (is_array($query)) {
            $query = http_build_query($query);
        }
        
        if (!$this->isValidQuery($query)) {
            throw new \InvalidArgumentException("Invalid query '$query'");
        }
        
        $this->query = (string)$query;
    }
546634
public function setStatus($status) {
        if (!in_array($status, array(self::STATUS_INACTIVE, self::STATUS_PUBLISHED))) {
            throw new \InvalidArgumentException("Invalid status");
        }
        $this->status = $status;
    }
192985
public function setUnit($unit)
    {
        $validUnits = self::getValidUnits();

        if (!in_array($unit, $validUnits)) {
            throw new \InvalidArgumentException('Unknown value for time unit interval.');
        }

        $this->unit = $unit;

        return $this;
    }
870406
public function applyDateInterval($interval, $unit)
    {
        if ($interval > 0) {
            $this->add(new RhubarbDateInterval("P{$interval}{$unit}"));
        } elseif ($interval < 0) {
            $interval *= -1;
            $this->sub(new RhubarbDateInterval("P{$interval}{$unit}"));
        }
    }
384591
public function add($interval)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->add($interval);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::add($interval);
        }
    }
653219
public function setStep($step)
    {
        if (is_int($step)) {
            $this->step = $step;
        } else {
            $msg = "'Step' must be an integer, '" . gettype($step) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }