@param string $sentVia

@throws InvalidArgumentException
516754
public function setSentVia($sentVia)
    {
        if (is_string($sentVia) && in_array($sentVia, self::$sentVias)) {
            $this->sentVia = $sentVia;
        } else {
            throw new InvalidArgumentException;
        }
    }
728378
public function push($option, $value)
	{
		if ( ! is_string($option))
		{
			throw new \InvalidArgumentException('The option value must be a string type.');
		}
		
		$this->heap[$option][] = $value;
	}
1344458
private function parseRoute($route)
    {
        if (is_string($route) || is_numeric($route) || $route instanceof UriInterface) {
            $route = array_merge(
                $this->defaultRedirect,
                [ 'route' => $route ]
            );
        } else {
            if (!is_array($route)) {
                throw new InvalidArgumentException(
                    'The new path must be a string (%s) or an array structure; received %s',
                    'URI, \Psr\Http\Message\UriInterface, or the name of a \Slim\Route',
                    (is_object($route) ? get_class($route) : gettype($route))
                );
            }

            if (!isset($route['status'])) {
                $route['status'] = $this->defaultRedirect['status'];
            }

            if (!isset($route['route_type'])) {
                $route['route_type'] = null;
            }

            if (!isset($route['data_key'])) {
                $route['data_key'] = null;
            }

            if (isset($route['template_route'])) {
                $route['route']         = $route['template_route'];
                $route['methods']       = [ 'GET' ];
                $route['data_key']      = 'template_data';
                $route['route_type']    = 'templates';
                $route['template_data'] = [];
                unset($route['template_route']);
            } elseif (isset($route['action_route'])) {
                $route['route']       = $route['action_route'];
                $route['methods']     = [ 'POST' ];
                $route['data_key']    = 'action_data';
                $route['route_type']  = 'actions';
                $route['action_data'] = [];
                unset($route['action_route']);
            } elseif (isset($route['script_route'])) {
                $route['route']       = $route['script_route'];
                $route['methods']     = [ 'GET' ];
                $route['data_key']    = 'script_data';
                $route['route_type']  = 'scripts';
                $route['script_data'] = [];
                unset($route['script_route']);
            } else {
                if (isset($route['route_type'])) {
                    switch ($route['route_type']) {
                        case 'templates':
                            $route['data_key'] = 'template_data';
                            $route['methods']  = [ 'GET' ];
                            break;

                        case 'actions':
                            $route['data_key'] = 'action_data';
                            $route['methods']  = [ 'POST' ];
                            break;

                        case 'scripts':
                            $route['data_key'] = 'script_data';
                            $route['methods']  = [ 'GET' ];
                            break;

                        case 'template':
                        case 'action':
                        case 'script':
                            $route['data_key']    = $route['route_type'] . '_data';
                            $route['route_type'] .= 's';
                            $route['methods'] = ($route['route_type'] === 'actions') ? [ 'POST' ] : [ 'GET' ];
                            break;

                        default:
                            $route['data_key']   = null;
                            $route['route_type'] = null;
                    }
                }

                if (!isset($route[$route['data_key']])) {
                    $route[$route['data_key']] = [];
                }
            }

            $found = false;
            if ($route['route_type'] && isset($route['route'])) {
                $container = $this->app()->getContainer();
                $routeName = $route['route'];
                $routeType = $route['route_type'];
                $appRoutes = $container['config']['routes'];

                if (isset($appRoutes[$routeType])) {
                    $appRoutes = $appRoutes[$routeType];

                    if (isset($appRoutes[$routeName])) {
                        $route = array_merge($route, $appRoutes[$routeName]);
                        $found = true;
                    } else {
                        foreach ($appRoutes as $targetRoute) {
                            if (isset($targetRoute['ident']) && $targetRoute['ident'] === $routeName) {
                                $route = array_merge($route, $targetRoute);
                                $found = true;
                            }
                        }
                    }
                }
            }

            if ($found === false) {
                if (!isset($route['route'])) {
                    $route['route'] = $this->defaultRedirect['route'];
                }

                if (!isset($route['methods'])) {
                    $route['methods'] = $this->defaultRedirect['methods'];
                }
            }
        }

        return $route;
    }
1289740
public function setPriority(int $priority): void
    {
        if ($priority < 0 || $priority > static::MAX_PRIORITY) {
            throw new \InvalidArgumentException('Priority must be an unsigned integer on the range [0-65535]');
        }

        $this->priority = $priority;
    }
1107215
public function add($value)
    {
        if (!$value instanceof EmailBodyPart) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s.',
                    __FUNCTION__, EmailBodyPart::class
                )
            );
        }

        return parent::add($value);
    }
134408
public function setServerAddress($serverAddress)
    {
        $serverAddress = (string) $serverAddress;
        if ($serverAddress === '') {
            throw new \InvalidArgumentException('$serverAddress cannot be empty');
        }

        $this->serverAddress = $serverAddress;
    }
1084407
public function setValue($value, $submittedValue = null)
    {
        if ($submittedValue !== null && is_array($submittedValue)) {
            $submitted = in_array($value, $submittedValue);

            if ($submitted === true) {
                $this->check();
            }
        }

        return parent::setValue($value);
    }
375167
public function setRecipient($value)
    {
        if ($value === null || $value === '') {
            $this->_recipient = null;
        } elseif (is_object($value) && $value instanceof RecipientInterface) {
            $this->_recipient = $value;
        } else {
            throw new \InvalidArgumentException('Invalid recipient value type');
        }
    }
854716
public function offsetSet($offset, $value): void
    {
        if (false === $this->checkType($this->getKeyType(), $offset)) {
            throw new InvalidArgumentException(
                'Key must be of type ' . $this->getKeyType() . '; key is '
                . $this->toolValueToString($offset)
            );
        }

        if (false === $this->checkType($this->getValueType(), $value)) {
            throw new InvalidArgumentException(
                'Value must be of type ' . $this->getValueType() . '; value is '
                . $this->toolValueToString($value)
            );
        }

        parent::offsetSet($offset, $value);
    }
699980
public function setShowSolution($showSolution)
    {
        if (is_bool($showSolution)) {
            $this->showSolution = $showSolution;
        } else {
            $msg = "ShowSolution must be a boolean, '" . gettype($showSolution) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
389761
public function setSubject($value)
    {
        if (trim($value) == null)
        {
            throw new InvalidArgumentException("Subject cannot be empty.");
        }
        $this->subject = trim($value);
    }
315267
protected function throwIfPointNotValid($point, $pointName, array $allowedStringValues)
    {
        if (is_string($point) && in_array($point, $allowedStringValues)) {
            return;
        }

        if (is_integer($point) && $point >= 0) {
            return;
        }

        throw new \InvalidArgumentException(sprintf(
            'Expected "%s" one of the [%s] or integer greater than zero',
            $pointName,
            implode('|', $allowedStringValues)
        ));
    }
102721
public function append($value)
    {
        if (!$value instanceof $this->currencyClass) {
            throw new \InvalidArgumentException(sprintf('$newval must be an instance of Currency, instance of "%s" given', get_class($value)));
        }

        parent::append($value);
    }
613066
public function push($line)
    {
        if ($this->socket === null) {
            throw new \Erebot\IllegalActionException('Uninitialized socket');
        }

        if (strcspn($line, "\r\n") != strlen($line)) {
            throw new \Erebot\InvalidValueException(
                'Line contains forbidden characters'
            );
        }
        $this->sndQueue[] = $line;
    }
137090
public function preparar()
    {
        // Validamos la sentencia a preparar
        if (empty($this->sentencia)) {
            if ($this->arrojarExcepciones) {
                throw new \InvalidArgumentException('La sentencia a preparar se encuentra vacia.');
            }
        }

        return $this->pdo->prepare($this->sentencia);
    }
1147946
public function validateValue($value)
    {
        if (!$value instanceof MoneyInterface) {
            throw new Exception\InvalidArgumentException(
                sprintf(
                    'Value of type "%s" is invalid for %s; must implement "%s"',
                    is_object($value) ? get_class($value) : gettype($value),
                    get_class($this),
                    MoneyInterface::class
                )
            );
        }
    }
1262954
public static function set(string $key, $value)
    {
        if (!in_array($key, self::$allowedKeys)) {
            throw new \InvalidArgumentException('Invalid key given');
        }

        self::$storedValues[$key] = $value;
    }