Set the source integer that must be matched exactly.

@param integer $sourceValue An integer value.
@throws \InvalidArgumentException If $sourceValue is not an integer.
194849
public function setSourceValue($sourceValue)
    {
        if (is_int($sourceValue)) {
            $this->sourceValue = $sourceValue;
        } else {
            $msg = "SourceValue must be an integer, '" . gettype($sourceValue) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1248541
public function setSource(Processable $source)
    {
        if ($source instanceof RuleProcessor) {
            parent::setSource($source);
        } else {
            $msg = "RuleProcessingException::setSource only accept RuleProcessor objects.";
            throw new InvalidArgumentException($msg);
        }
    }
1004724
public function setSource($source)
    {
        if ($source !== null && !\Erebot\Utils::stringifiable($source)) {
            throw new \Erebot\InvalidValueException('Not a valid nickname');
        }

        $this->source = $source;
    }
1077635
protected function setValue($value)
    {
        if (!is_int($value)) {
            throw InvalidTypeException::fromMessageAndPrototype("Value must be an integer", static::prototype());
        }
        $this->value = $value;
    }
925137
protected function setValues($type)
    {
        switch ($type) {
            case static::CLIENT:
                $this->values = ['cs', 'cr'];
                break;
            case static::SERVER:
                $this->values = ['sr', 'ss'];
                break;
            default:
                throw new \InvalidArgumentException('$type must be TYPE_CLIENT or TYPE_SERVER');
        }
    }
22756
private function mergeArrayValues(array &$source, array &$values)
    {
        foreach ($values as $key => $value) {
            if (isset($source[$key])) {
                $sourceValue = $source[$key];

                if ($sourceValue instanceof IConfigValue) {
                    $sourceValue->set($value);
                } elseif (is_array($sourceValue) || $sourceValue instanceof IConfig) {
                    if (!is_array($value)) {
                        throw new InvalidArgumentException($this->translate(
                            'Value should be an array, "{type}" has been given',
                            ['type' => gettype($value)]
                        ));
                    }

                    if ($sourceValue instanceof IConfig) {
                        $sourceValue->merge($value);
                    } else {
                        $this->mergeArrayValues($sourceValue, $value);
                    }
                } else {
                    throw new UnexpectedValueException($this->translate(
                        'Config source is corrupted.'
                    ));
                }
            } else {
                if (is_array($value)) {
                    $source[$key] = [];
                    $this->mergeArrayValues($source[$key], $value);
                } else {
                    $source[$key] = $this->createConfigValue($value);
                }
            }
        }
    }
455443
function offsetSet($offset, $value)
    {
        if (!$value instanceof Attribute) {
            throw new InvalidArgumentException(
                "Value is not an instance of \\Sirel\\Attribute"
            );
        }
        $this->attributes[$offset] = $value;
    }
369111
public function setSource(Processable $source)
    {
        if ($source instanceof ExpressionProcessor) {
            parent::setSource($source);
        } else {
            $msg = "ExpressionProcessingException::setSource only accept ExpressionProcessor objects.";
            throw new InvalidArgumentException($msg);
        }
    }
720407
public function addRequiredValue($requiredValue, $operator)
    {
        if(!is_int($requiredValue)){
            throw new \InvalidArgumentException('Required value must be an integer.');
        }
        
        $this->requiredValues[] = array(
            'requiredValue' => $requiredValue,
            'operator' => $operator,
            'isValid' => null,
        );
        
        return $this;
    }
946843
public function setN($n)
    {
        if (is_int($n) || (gettype($n) === 'string' && Format::isVariableRef($n))) {
            $this->n = $n;
        } else {
            $msg = "The n attribute must be an integer or a variable reference, '" . gettype($n) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
904945
protected function checkValueStructure(BaseValue $value)
    {
        // Input file URI, if set needs to point to existing file
        if (isset($value->inputUri)) {
            if (!file_exists($value->inputUri)) {
                throw new InvalidArgumentValue(
                    '$value->inputUri',
                    $value->inputUri,
                    get_class($this)
                );
            }
        } elseif (!isset($value->id)) {
            throw new InvalidArgumentValue(
                '$value->id',
                $value->id,
                get_class($this)
            );
        }

        // Required parameter $fileName
        if (!isset($value->fileName) || !is_string($value->fileName)) {
            throw new InvalidArgumentValue(
                '$value->fileName',
                $value->fileName,
                get_class($this)
            );
        }

        // Optional parameter $fileSize
        if (isset($value->fileSize) && !is_int($value->fileSize)) {
            throw new InvalidArgumentValue(
                '$value->fileSize',
                $value->fileSize,
                get_class($this)
            );
        }
    }
1260638
protected function createValueFromInput( $inputValue )
    {
        if ( is_array( $inputValue ) )
        {
            foreach ( $inputValue as $index => $inputValueItem )
            {
                if ( !$inputValueItem instanceof Meta )
                {
                    throw new InvalidArgumentType(
                        '$inputValue[' . $index . ']',
                        "\\Novactive\\Bundle\\SEOBundle\\API\\Repository\\Values\\Metas\\Meta",
                        $inputValueItem
                    );
                }
            }
            $inputValue = new Value( $inputValue );
        }

        return $inputValue;
    }
1156178
public function setMasteryValue($masteryValue)
    {
        if ((is_bool($masteryValue) && $masteryValue === false) || is_float($masteryValue) || is_double($masteryValue)) {
            $this->masteryValue = $masteryValue;
        } else {
            $msg = "The masteryValue argument must be a floating point value or false, '" . gettype($masteryValue) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
871359
public function setX($x)
    {
        if (is_int($x)) {
            $this->x = $x;
        } else {
            $msg = "The X argument must be an integer value, '" . gettype($x) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1014973
public function setSenderType($senderType)
    {
        $allowedValues = $this->getSenderTypeAllowableValues();
        if (!in_array($senderType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'senderType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['senderType'] = $senderType;

        return $this;
    }
929579
public static function notNull($argValue, $argName = '')
    {
        $valid = ($argValue !== null);
        if (!$valid) {
            $message = implode(' ', array_filter(['Argument', $argName, 'must not be null']));
            throw new \InvalidArgumentException($message);
        }
        return $valid;
    }
1292024
public function setValue($value) {
        if ($value !== null) {
            if ($this->isIncremental() && ! is_numeric($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non numeric value "%s" on incremental option "%s".',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isBoolean() && ! is_bool($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non boolean value "%s" on boolean option "%s".',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isSingle() && ! is_scalar($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non scalar value "%s" on option "%s" ' .
                    'that expects one scalar value.',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }

            if ($this->isMultiple() && ! is_array($value)) {
                throw new InvalidOptionValueException(s(
                    'Trying to set a non array value "%s" on option "%s" ' .
                    'that expects multiple values.',
                    get_type($value),
                    $this->getNameOrAlias()
                ));
            }
        }

        $this->value = $value;

        return $this;
    }