Checks if all required parameters are set.

@return $this

@throws InvalidArgumentException Thrown in case of missing required arguments.
551696
protected function checkRequiredParameters()
    {
        $missing = array_diff(
            $this->getRequiredOptions(),
            array_keys($this->getOptions())
        );
        if (!empty($missing)) {
            throw new InvalidArgumentException(
                sprintf(
                    'Missing required parameters: %s',
                    implode(', ', $missing)
                ),
                self::STATE_UNKNOWN
            );
        }

        return $this;
    }
398713
public function setArgument(Argument $arg)
    {
        if ($this->mode == Getopt::NO_ARGUMENT) {
            throw new \InvalidArgumentException("Option should not have any argument");
        }
        $this->argument = $arg;
        return $this;
    }
506393
protected function checkConfiguration()
    {
        if (
            empty($this->config['name'])
            || empty($this->config['username'])
            || empty($this->config['host'])
        ) {
            throw new InvalidArgumentException(static::E_CONFIG);
        }
    }
639556
private function handleMissingRequiredParameters()
    {
        $leftover = count($this->requiredParams);

        if (0 < $leftover) {
            if (1 == $leftover) {
                $msg = 'The required parameter \'%s\' is missing';
            } else {
                $msg = 'The required parameters \'%s\' are missing';
            }

            throw new \Exception(sprintf($msg, implode('\', \'', $this->requiredParams)));
        }
    }
899645
protected function validateRequired()
  {
    if ($this->isRequired() && empty($this->value)) {
      $this->addError(sprintf($this->tmpl_err_required, $this->getName()));

      return false;
    }

    return true;
  }
748898
public boolean hasAllMandatoryParameters() {
        if (!super.f_Parameters.keySet().containsAll(mandatoryParam) || super.f_Parameters.values().contains(null)) {
            return false;
        }
        if (!super.v_Parameters.containsKey(_INDEX_V_CalledPartyNumber)
                || super.v_Parameters.get(_INDEX_V_CalledPartyNumber) == null) {
            return false;
        }
        return true;
    }
505664
public function setClient()
    {
        if(empty($this->apiKey))
        {
            throw new InvalidArgumentException('Api key can not be empty');
        }

        $this->client = new Client($this->apiKey);
    }
787883
protected function checkRequirements()
    {
        parent::checkRequirements();

        // verify there is at least one item added
        if (empty($this->items) || $this->items->count() === 0) {
            throw new \Genesis\Exceptions\ErrorParameter('Empty (null) required parameter: items');
        }
    }
348734
public function setParameters()
	{		
		//set the url parameter from the UrlParserObjectInstance
		$this->parameters = $this->UrlParserObjectInstance->getParameters();

		//populate the Input Class data
		Input::setGet()->setPost();
		
		//return this object instance
		return $this;

	}
464911
public function validate()
    {
        foreach (func_get_args() as $key) {
            $value = $this->parameters->get($key);
            if (empty($value) && $value !== '0' && $value !== false) {
                throw new InvalidRequestException("The $key parameter is required");
            }
        }
    }
1105028
public function validateArguments()
    {
        parent::validateArguments();

        if (empty($this->arguments['signature'])
            && (empty($this->arguments['extension']) || empty($this->arguments['main']) || empty($this->arguments['sub'])
            )
        ) {
            throw new \InvalidArgumentException('ifHasAccessToModule view helper requires either "signature" or all three other arguments: "extension", "main" and "sub". Please set arguments properly.', 1496314352);
        }
    }
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);
    }
322995
private function checkRequired()
    {
        // Loop through all params
        foreach ($this->params as $param) {
            if (array_key_exists('required', $param) && $param['required'] == true) {
                if (!array_key_exists($param['name'], $this->pinputs)) {
                    throw new \Exception('Parameter "' . $param['name'] . '" is required');
                }
            }
        }

        // Loop through all options
        foreach ($this->options as $key => $option) {
            // if option is required
            if (array_key_exists('required', $option) && $option['required'] == true) {
                // check that it is defined in pinputs
                if ($this->pinputs[$option['short']] == false) {
                    throw new \Exception('Option "' . $option['help'] . '" is required');
                }
            }
        }

    }
95062
public function setConfig()
    {
        // error
        if (func_num_args() < 2 || func_num_args() > 3) {
            throw new InvalidArgumentException('Invalid Call of method "config"');
        }

        // default main config
        if (func_num_args() == 2) {
            return $this->setConfig('main', func_get_arg(0), func_get_arg(1));
        }

        // default global config
        return $this->configObject(func_get_arg(0))->setConfig(func_get_arg(1), func_get_arg(2));
    }
1271088
public function validate()
    {
        foreach ($this as $element) {

            if (
                $element instanceof ValidationAwareInterface ||
                $element instanceof ContainerInterface
            ) {
                $element->validate();
            }
        }
        return $this;
    }
1354190
public function set($requiredType)
    {
        if (!in_array($requiredType, $this->validTypes)) {
            throw new \InvalidArgumentException("{$requiredType} is not a supported number type");
        }
        if ($requiredType == self::TYPE_GMP && !extension_loaded('gmp')) {
            throw new \InvalidArgumentException('GMP not supported');
        }

        $this->requiredType = $requiredType;

        return $this;
    }
882688
public function withNoArgs()
    {
        $this->expectation->setMatchesCallback(function($name, $args) {
            if ($name == $this->methodName && count($args) == 0) {
                return true;
            } else {
                return false;
            }
        });

        $this->commentBuilder->setArgs([]);
        
        return $this;
    }