{@inheritdoc}

@throws \InvalidArgumentException
6099
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition(TaggedServices::class)) {
            return;
        }

        $manager = $container->getDefinition(TaggedServices::class);

        $definitions = $container->getDefinitions();
        foreach ($definitions as $id => $definition) {
            foreach ($definition->getTags() as $tagName => $tagAttributes) {
                $manager->addMethodCall(
                    'addSpecification',
                    [$id, $tagName, $tagAttributes[0]]
                );
            }
        }
    }
226329
public function setValues($values)
    {
        if ((null !== $values) && (false === is_array($values))) {
            if (false === ($values instanceof ArrayAccess)) {
                throw new InvalidArgumentException(
                    'The value of $values is not an array or an instance of ArrayAccess.'
                );
            }
        }

        $this->values = $values;
    }
1275423
public static function initialize(Configuration $configuration)
    {
        $configuration = static::normalizeConfiguration($configuration);
        
        if (!$configuration->validateIdentity()) {
            throw new InvalidArgumentException('Bad configuration identity');
        }
        
        if (!$configuration->validateConnection()) {
            throw new InvalidArgumentException('Bad connection settings. Check your configuration file ":file"', [
                'file' => $configuration->getIdentity(),
            ]);
        }
        
        static::loadAdditionalConfiguration($configuration);
        
        static::getServiceContainer()->set('configuration', $configuration);
        static::getServiceContainer()->set('classLoader', self::initializeClassLoader());
        
        static::getServiceContainer()->getDispatcher()
            ->addListener(null, [static::getServiceContainer()->getLogger(), 'event']);
    }
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;
    }
656677
public function call()
    {
        $host = $this->getHost();
        if (!$host || empty($host)) {
            throw new InvalidArgumentException('Host não informado');
        }

        $service = $this->getService();
        if (!$service || empty($service)) {
            throw new InvalidArgumentException('Serviço não informado');
        }

        $request = $this->getRequest();
        if (!$request || empty($request)) {
            throw new InvalidArgumentException('Request não informada');
        }

        $this->connect();
        $client = $this->getClient();

        return $client->__soapCall($service, $request);
    }
960682
public function execute($options = [])
    {
        if (! is_array($options) && ! $options instanceof Option) throw new \InvalidArgumentException('invalid option');
        if (! $this->do) throw new \Samurai\Samurai\Exception\LogicException('preset task something do.');

        $option = $this->getOption($this->do);
        if (is_array($options)) {
            $option->importFromArray($options);
        } else {
            $option->import($options);
        }
        $option->validate();
        $this->{$this->do . 'Task'}($option);
    }
195005
protected function set_options( array $options = [ ] ) {

		foreach ( $options as $key => $value ) {
			if ( ! array_key_exists( $key, $this->options ) ) {
				throw new \InvalidArgumentException(
					sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ),
					1.0
				);
				continue;
			}

			$this->options[ $key ] = $value;
		}
	}
265403
public function process(ContainerBuilder $container)
    {
        if (!$container->hasDefinition($this->processorFactoryService) && !$container->hasAlias($this->processorFactoryService)) {
            return;
        }

        $dispatcher = $container->findDefinition($this->processorFactoryService);

        foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $tags) {
            $def = $container->getDefinition($id);
            $this->assertProcessorDefinition($def, $id);
            foreach ($tags as $attributes) {
                if (empty($attributes['command'])) {
                    throw new InvalidArgumentException(sprintf('The service "%s" is tagged as processor without specifying "command" attribute', $id));
                }
                $dispatcher->addMethodCall('registerProcessorIdForCommand', array(
                    $attributes['command'],
                    $id,
                ));
            }
        }
    }
1129839
public function initialize()
    {
        if (!file_exists($this->paramsPathname)) {
            throw new \InvalidArgumentException("Invalid Magento root '$this->magentoRoot'.");
        }

        $params = $this->getParams();
        $params['code'] = $this->store;
        $params['type'] = $this->scope;
        $this->saveParams($params);
    }
960734
public function add($method)
    {
        if (!$method instanceof MethodInterface) {
            throw new \InvalidArgumentException('This Method must be a instance of \ClassGeneration\MethodInterface');
        }
        if ($method->getName() === null) {
            $method->setName('method' . ($this->count() + 1));
        }

        parent::set($method->getName(), $method);
        return true;
    }
178283
public function setName(string $name): void
	{
		if ($name === '') {
			throw new InvalidArgumentException;
		}
		if (Strings::match($name, '/[^A-Za-z0-9_]/')) {
			throw new InvalidArgumentException('Name contains invalid characters');
		}

		/* @var $repository AclRolesRepository */
		$repository = $this->getRepository();
		$role = $repository->getByName($name);
		if ($role !== null && $role !== $this) {
			throw new UniqueConstraintViolationException("Role '$name' exists");
		}
		$this->name = $name;
	}
811950
protected function getConfig($key = null)
    {
        if ($this->config === null) {
            $this->setConfig();
        }

        if (null === $key) {
            return $this->config;
        }

        if (!array_key_exists($key, $this->config)) {
            throw new InvalidArgumentException("key: '" . $key . "' is not set in configuration options.");
        }

        return $this->config[$key];
    }
596553
public function execute($one = false, $scalar = false, $preserveKeys = false)
    {
        if (true === $scalar && (count($this->select) > 1 || true === isset($this->select['*']))) {
            throw new \InvalidArgumentException('$scalar can only be true if only one field is selected.');
        }

        $result = [];

        foreach ($this->from as $key => $item) {
            if (true === $this->evaluateWhere($item)) {
                $resultItem = $this->evaluateSelect($item, $scalar);

                if (true === $one) {
                    return $resultItem;
                }

                if ($preserveKeys) {
                    $result[$key] = $resultItem;
                }
                else {
                    $result[] = $resultItem;
                }
            }
        }

        return $result;
    }
1183006
protected function setValue($value)
    {
        if (!$this->validate($value)) {
            throw new \InvalidArgumentException(sprintf('%s is not a valid value', $value));
        }

        $this->value = $value;
    }
239120
public function nodeValue($key)
    {
        if (!isset($this->keyToIndexMap[$key]) || !$this->values[$this->keyToIndexMap[$key]] instanceof Node) {
            throw new \InvalidArgumentException(sprintf('value for %s is not of type %s', $key, 'NODE'));
        }

        return $this->value($key);
    }
1295270
public function resolve($key) {
        if (!array_key_exists($key, $this->bindings)) {
            throw new InvalidArgumentException("{$key} is not bound.");
        }

        $binding = $this->bindings[$key];
        $value = $binding['value'];

        // singleton
        if ($value instanceof Closure) {
            return $value($this);
        }

        // anonymous object
        if (is_null($value) && class_exists('\\' . $key)) {
            return $this->make($key);
        }

        // labeled object
        if (is_string($value) && class_exists('\\' . $value)) {
            return $this->make($value);
        }

        return $value;
    }
505664
public function setClient()
    {
        if(empty($this->apiKey))
        {
            throw new InvalidArgumentException('Api key can not be empty');
        }

        $this->client = new Client($this->apiKey);
    }