The BYWEEKNO rule part specifies a COMMA-separated list of ordinals specifying weeks of the year.
Valid values are 1 to 53 or -53 to -1.

@param int $value

@throws \InvalidArgumentException

@return $this
975349
public function setByWeekNo($value)
    {
        if (!is_integer($value) || $value > 53 || $value < -53 || $value === 0) {
            throw new InvalidArgumentException('Invalid value for BYWEEKNO');
        }

        $this->byWeekNo = $value;

        $this->canUseBySetPos = true;

        return $this;
    }
826592
public function setMinRow($value)
    {
        if ($value != null) {
            $this->_params['min-row'] = $value;
        } else {
            unset($this->_params['min-row']);
        }
        return $this;
    }
937861
public function setMin(int $value)
    {
        $this->min = $value;

        $this->addValidationRule('min:' . $value);

        return $this;
    }
493532
public function setColorSaturation($value)
    {
        if (!is_numeric($value) ||
            $value < 0 || $value > 1
        ) {
            throw new \InvalidArgumentException(
                "The color saturation was invalid. ".
                "Only values in the range [0.0, 1.0] are allowed.");
        }
        $this->colorSaturation = (float)$value;
        return $this;
    }
552939
public function setAmount($value)
    {
        if ($value === null || $value === '') {
            $this->_amount = null;
        } else {
            if (!is_scalar($value)) {
                if (!is_object($value) || !method_exists($value, '__toString')) {
                    throw new InvalidPropertyValueTypeException(
                        'Invalid amount value type', 0, 'amount.value', $value
                    );
                }
                $value = (string)$value;
            }
            if (!is_numeric($value) || $value < 0.0) {
                throw new InvalidPropertyValueException(
                    'Invalid amount value "' . $value . '"', 0, 'amount.value', $value
                );
            } elseif ($value < 0.01) {
                $this->_amount = null;
            } else {
                $this->_amount = number_format($value, 2, '.', '');
            }
        }
    }
786160
public static function createInt($value)
    {
        if ($value instanceof NumericTypeInterface) {
            return $value->asIntType();
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException("'{$value}' is no valid numeric for IntType");
        }
        if (self::getRequiredType() == self::TYPE_GMP) {
            return new GMPIntType($value);
        }

        return new IntType($value);
    }
1203661
public function setValue($value)
	{
		// set default
		if( $value === "" )
		{
			$value = $this->value;
		}

		if( $this->type === "boolean" )
		{
			$value = is_bool($value) ? $value : in_array($value, ['y', 'yes', 'on', '1']);
		}
		else if( $this->type === "number" )
		{
			if( ! is_numeric($value) )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " must be a number");
			}
			$value = (float) $value;
			if( $this->required && $value === 0 )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " is required");
			}
		}
		else if( $this->type === "enum" )
		{
			if( ! in_array($value, $this->enum, true) )
			{
				$variant = "'" . implode("' or '", $this->enum) . "'";
				throw new \InvalidArgumentException($this->getTheTitle() . " must be equal " . $variant);
			}
		}
		else
		{
			$value = trim($value);
			if( $this->required && ! strlen($value) )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " is required");
			}
		}

		if( $this->type_of )
		{
			$value = call_user_func($this->type_of, $value);
			if( $value === false && $this->type !== "boolean" )
			{
				throw new \InvalidArgumentException($this->getTheTitle() . " value is invalid");
			}
		}

		$this->value = $value;
		return $this;
	}
532560
public function setRecNum($value)
    {
        if (is_array($value))
            $value = implode(',', $value);

        $this->params['rec_num'] = $value;

        return $this;
    }
1120240
public function setOrders($value)
    {
        if (!$this->_isNumericArray($value)) {
            $value = array ($value);
        }
        $this->_fields['Orders']['FieldValue'] = $value;
        return $this;
    }
1135345
public function setDefaultValue($value)
    {
        if (($value instanceof ValueGenerator) === false) {
            $value = new ValueGenerator($value);
        }

        if ($this->isValidParameterDefaultValue($value) !== true) {
            throw new InvalidArgumentException('Parameter default value is not valid.');
        }

        $this->defaultValue = $value;

        return $this;
    }
1160537
public function setBirthDate($value)
    {
        if (!preg_match($this->getBirthDateValidationRegex(), $value) || strtotime($value) === false) {
            throw new ErrorParameter('Birth date has to be in format dd-mm-yyyy.');
        }

        $this->birth_date = $value;

        return $this;
    }
1139861
public static function isNullOrNumeric($value, $message = null)
    {
        if (!is_null($value) && !is_numeric($value)) {
            throw new InvalidArgumentException(sprintf(
                $message ?: 'Expected null or numeric, but got %s',
                Helper::typeToString($value)
            ));
        }
    }
504651
public function addWeekdays($value)
    {
        $direction = $value > 0 ? 1 : -1;
        $value = abs($value);

        while ($value > 0) {
            $this->addDays($direction);

            while ($this->isWeekend()) {
                $this->addDays($direction);
            }

            $value--;
        }

        return $this;
    }
306962
public function setValue($value)
    {
        if (is_numeric($value)) {
            $value = (string) $value;
        }

        if (!is_string($value) && $value !== null) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($value) ? get_class($value) : gettype($value))));
        }

        $this->node->nodeValue = $value;

        return $this;
    }
354180
public function addWeekdays($value)
    {
        // Fix for weekday bug https://bugs.php.net/bug.php?id=54909
        $t = $this->toTimeString();
        $this->modify((int) $value.' weekday');

        return $this->setTimeFromTimeString($t);
    }
139565
public function setValue($value)
    {
        if (null !== $value) {
            if (!$this->validateValue($value)) {
                throw new \InvalidArgumentException(\sprintf(
                    'Binding invalid value (type "%s") into filter "%s" (%s)',
                    \is_object($value) ? \get_class($value) : \gettype($value),
                    $this->name,
                    \get_class($this)
                ));
            }

            $this->value = $value;
            $this->updateBound();
        }

        return $this;
    }
1090093
public function setTotal($value)
    {
        if (StaticValidator::validates('number', $value)) {
            $this->total = StaticFilter::filter('number',$value);
            $this->pages = ceil($this->total / $this->rowsPerPage);
        }
        return $this;
    }