The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute.
Valid values are 0 to 60.

@param int $value

@return $this

@throws \InvalidArgumentException
322156
public function setBySecond($value)
    {
        if (!is_integer($value) || $value < 0 || $value > 60) {
            throw new \InvalidArgumentException('Invalid value for BYSECOND');
        }

        $this->bySecond = $value;

        $this->canUseBySetPos = true;

        return $this;
    }
1323744
public function setEndTime(?string $value) : Migration
    {

        if ($this->data['end_time'] !== $value) {
            $this->data['end_time'] = $value;
            $this->setModified('end_time');
        }

        return $this;
    }
356422
public function setTotal($value)
    {
        if (!StaticValidator::isValid('number', $value)) {
            return $this;
        }

        $this->_total = StaticFilter::filter('number',$value);
        $this->_pages = ceil($this->_total / $this->_rowsPerPage);
        return $this;
    }
839596
public function setExpression($value)
    {
        $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY);
        if (count($this->cronParts) < 6) {
            throw new InvalidArgumentException(
                $value . ' is not a valid CRON expression'
            );
        }

        foreach ($this->cronParts as $position => $part) {
            $this->setPart($position, $part);
        }

        return $this;
    }
1056266
public function setWhen($value)
    {
        if (!is_callable($value) && $value !== null) {
            throw new InvalidArgumentException('When parameter must be callable type');
        }
        $this->when = $value;

        return $this;
    }
718219
public function setReceipt($value)
    {
        if (is_array($value)) {
            $this->receipt->fromArray($value);
        } elseif ($value instanceof ReceiptInterface) {
            $this->receipt = clone $value;
        } else {
            throw new InvalidPropertyValueTypeException('Invalid receipt value type', 0, 'receipt', $value);
        }

        return $this;
    }
488321
public function add($unit, $value = 1)
    {
        if (is_numeric($unit)) {
            $_unit = $value;
            $value = $unit;
            $unit = $_unit;
            unset($_unit);
        }

        if (is_string($unit) && !preg_match('/^\s*\d/', $unit)) {
            $unit = "$value $unit";
            $value = 1;
        }

        $interval = static::make($unit);

        if (!$interval) {
            throw new InvalidArgumentException('This type of data cannot be added/subtracted.');
        }

        if ($value !== 1) {
            $interval->times($value);
        }
        $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1;
        $this->years += $interval->y * $sign;
        $this->months += $interval->m * $sign;
        $this->dayz += ($interval->days === false ? $interval->d : $interval->days) * $sign;
        $this->hours += $interval->h * $sign;
        $this->minutes += $interval->i * $sign;
        $this->seconds += $interval->s * $sign;
        $this->microseconds += $interval->microseconds * $sign;

        $this->solveNegativeInterval();

        return $this;
    }
4952
protected function setTtlOption(?int $value): void
    {
        if (isset($value) && $value < 1) {
            throw new InvalidArgumentException('ttl cant be lower than 1');
        }

        $this->ttl = $value;
    }
620328
public function setValue($value)
    {
        if (!is_string($value) || (is_object($value) && !method_exists($value, "__toString"))) {
            throw new InvalidArgumentException(sprintf(
                "Invalid argument given to %s, expected a string, %s given",
                __METHOD__,
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        $value = (string) $value;

        if (null !== $regex = $this->getValidationRegex()) {
            if (! preg_match($regex, $value)) {
                throw new InvalidArgumentException(sprintf(
                    "The given value '%s' doesn't match the validation regular expression: %s",
                    $value,
                    $regex
                ));
            }
        }

        $this->value = $value;

        return $this;
    }
770729
public function setByHour($value)
    {
        if (!is_integer($value) || $value < 0 || $value > 23) {
            throw new \InvalidArgumentException('Invalid value for BYHOUR');
        }

        $this->byHour = $value;

        $this->canUseBySetPos = true;

        return $this;
    }
968193
public function setGrayscaleSaturation($value)
    {
        if (!is_numeric($value) ||
            $value < 0 || $value > 1
        ) {
            throw new \InvalidArgumentException(
                "The grayscale saturation was invalid. ".
                "Only values in the range [0.0, 1.0] are allowed.");
        }
        $this->grayscaleSaturation = (float)$value;
        return $this;
    }
906231
public function set($value = null)
	{
		$ts = sfDateTimeToolkit::getTS($value);
		
		$this->ts = $ts;
		if ($this->init === null)
		{
			$this->init = $ts;
		}
		
		return $this;
	}
1064309
public function hour($value): self
    {
        $value = \is_array($value) ? $value : \func_get_args();

        return $this->spliceIntoPosition(2, \implode(',', $value));
    }
1274141
protected function normalizeDateTime($value)
    {
        try {
            if (is_int($value)) {
                //timestamp
                $value = new DateTime("@$value");
            } elseif (!$value instanceof DateTime) {
                $value = new DateTime($value);
            }
        } catch (\Exception $e) {
            throw new InvalidArgumentException('Invalid date string provided', $e->getCode(), $e);
        }

        return $value;
    }
901659
private function formatTimestampForApi($value)
    {
        list ($dt, $nanos) = $this->parseTimeString($value);

        return [
            'seconds' => (int) $dt->format('U'),
            'nanos' => (int) $nanos
        ];
    }
462162
public function setBirthdateY($value)
    {
        if ($value === null) {
            $this->parameters['birthdateY'] = null;
        } else {
            $datetime = new \DateTime('now');
            $max = (int)$datetime->format('Y');
            validators\Number::validate($value, 1, $max, 'Invalid birthdateY');
            $this->parameters['birthdateY'] = min($max, max(1, (int)$value));
        }
        return $this;
    }
1139769
public function setCodeLength($value)
    {
        $this->codeLength = filter_var(
            $value,
            FILTER_VALIDATE_INT,
            array(
                'options' => array(
                    'min_range' => self::CODE_LENGTH_DEFAULT,
                    'max_range' => self::CODE_LENGTH_MAX
                )
            )
        );

        if (!$this->codeLength) {
            throw new \Exception('The code length have to be between 6 and 20 included.');
        }

        return $this;
    }