@param \Spryker\Zed\CodeGenerator\Business\Generator\CodeGeneratorInterface[] $requiredGenerators

@return void
486153
protected function addRequiredGenerators(array $requiredGenerators)
    {
        foreach ($requiredGenerators as $requiredGenerator) {
            $this->addRequiredGenerators($requiredGenerator->getRequiredGenerators());
            $this->addRequiredGenerator($requiredGenerator);
        }
    }
884303
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'amount',
            'currency',
            'card_holder',
            'card_number',
            'expiration_month',
            'expiration_year'
        ];

        $this->requiredFields = \Genesis\Utils\Common::createArrayObject($requiredFields);

        $requiredFieldValues = array_merge(
            [
                'currency' => \Genesis\Utils\Currency::getList()
            ],
            $this->getCCFieldValueFormatValidators()
        );

        $this->requiredFieldValues = \Genesis\Utils\Common::createArrayObject($requiredFieldValues);

        $requiredFieldsConditional = [
            'notification_url'   => ['return_success_url', 'return_failure_url'],
            'return_success_url' => ['notification_url', 'return_failure_url'],
            'return_failure_url' => ['notification_url', 'return_success_url']
        ];

        $this->requiredFieldsConditional = \Genesis\Utils\Common::createArrayObject($requiredFieldsConditional);

        $requiredFieldsGroups = [
            'synchronous'  => ['notification_url', 'return_success_url', 'return_failure_url'],
            'asynchronous' => ['mpi_eci']
        ];

        $this->requiredFieldsGroups = \Genesis\Utils\Common::createArrayObject($requiredFieldsGroups);
    }
265673
protected static function parseStage($formStageArgument, array $requiredFieldNames = null, array $fieldNamesDefinedInStage = [])
    {
        if ($formStageArgument instanceof Form) {
            $formStageArgument = $formStageArgument->build();
        }

        if ($formStageArgument instanceof IForm) {
            return new IndependentFormStage($formStageArgument);
        }

        if (is_callable($formStageArgument)) {
            $requiredParameters = Reflection::fromCallable($formStageArgument)->getNumberOfRequiredParameters();

            if ($requiredParameters === 0) {
                $form = $formStageArgument();

                if ($form instanceof Form) {
                    $form = $form->build();
                }

                return new IndependentFormStage($form);
            } elseif ($requiredParameters === 1) {
                return new DependentFormStage($formStageArgument, $fieldNamesDefinedInStage, $requiredFieldNames);
            }

            throw InvalidArgumentException::format(
                    'Invalid form stage argument: callable must have 0 or 1 required parameters, %s given',
                    $requiredParameters
            );
        }

        throw InvalidArgumentException::format(
                'Invalid form stage argument: expecting %s|%s|%s, %s given',
                IForm::class, Form::class, 'callable', Debug::getType($formStageArgument)
        );
    }
1367719
public function requireDefaultRecords() {
        parent::requireDefaultRecords();
        
        
        $codeVersion=singleton('CodeBank')->getVersion();
        
        if(!CodeBankConfig::get()->first()) {
            $conf=new CodeBankConfig();
            $conf->Version=$codeVersion;
            $conf->write();
            
            DB::alteration_message('Default Code Bank Config Created', 'created');
        }
        
        
        if(!Group::get()->filter('Code', 'code-bank-api')->first()) {
            $group=new Group();
            $group->Title='Code Bank Users';
            $group->Description='Code Bank Access Group';
            $group->Code='code-bank-api';
            $group->write();
            
            $permission=new Permission();
            $permission->Code='CODE_BANK_ACCESS';
            $permission->Type=1;
            $permission->GroupID=$group->ID;
            $permission->write();
            
            DB::alteration_message('Code Bank Users Group Created', 'created');
        }
        
        
        //Check for and perform any needed updates
        $codeVersionTmp=explode(' ', $codeVersion);
        $dbVerTmp=explode(' ', CodeBankConfig::CurrentConfig()->Version);
        if($codeVersionTmp[0]!='@@VERSION@@' && $codeVersionTmp[0]!=$dbVerTmp[0]) {
            $updateXML=simplexml_load_string(file_get_contents('http://update.edchipman.ca/codeBank/airUpdate.xml'));
            $latestVersion=strip_tags($updateXML->version->asXML());
            $versionTmp=explode(' ', $latestVersion);
            
            //Sanity Check code version against latest
            if(version_compare($codeVersionTmp[0], $versionTmp[0], '>')) {
                DB::alteration_message('Unknown Code Bank server version '.$codeVersion.', current version available for download is '.$latestVersion, 'error');
                return;
            }
            
            //Sanity Check make sure latest version is installed
            if($codeVersionTmp[0]!=$versionTmp[0]) {
                DB::alteration_message('A Code Bank Server update is available, please <a href="http://programs.edchipman.ca/applications/code-bank/">download</a> and install the update then run dev/build again.', 'error');
                return;
            }
            
            //Sanity Check database version against latest
            if(version_compare($dbVerTmp[0], $versionTmp[0], '<')) {
                $data=array(
                            'version'=>CodeBankConfig::CurrentConfig()->Version,
                            'db_type'=>'SERVER'
                        );
                
                $data=http_build_query($data);
                
                
                $context=stream_context_create(array(
                                                    'http'=>array(
                                                                'method'=>'POST',
                                                                'header'=>"Content-type: application/x-www-form-urlencoded\r\n"
                                                                            ."Content-Length: ".strlen($data)."\r\n",
                                                                'content'=>$data
                                                            )
                                                ));
                
                
                //Download and run queries needed
                $sql=simplexml_load_string(file_get_contents('http://update.edchipman.ca/codeBank/DatabaseUpgrade.php', false, $context));
                $sets=count($sql->query);
                foreach($sql->query as $query) {
                    $queries=explode('$',$query);
                    $t=count($queries);
                
                    foreach($queries as $query) {
                        if(empty($query)) {
                            continue;
                        }
                
                        DB::query($query);
                    }
                }
                
                
                //Update Database Version
                $codeBankConfig=CodeBankConfig::CurrentConfig();
                $codeBankConfig->Version=$latestVersion;
                $codeBankConfig->write();
                
                
                DB::alteration_message('Code Bank Server database upgraded', 'changed');
            }
        }
    }
179397
public static function requireParamsObj(string ...$requiredParameters): stdClass
    {
        $class = new stdClass();

        foreach (static::requireParams(...$requiredParameters) as $param => $value) {
            $class->$param = $value;
        }

        return $class;
    }
863432
protected function checkRequirements()
    {
        $required_properties = array('_buildFile');
        foreach ($required_properties as $required_property) {
            if (empty($this->$required_property)) {
                throw new \BuildException(
                    "Missing required property '" . $required_property . "'."
                );
            }
        }
    }
924755
protected function validateS3Config(array $config, array $requiredKeys)
    {
        foreach ($requiredKeys as $requiredKey) {
            if (!array_key_exists($requiredKey, $config)) {
                throw new InvalidConfigException($requiredKey);
            }
        }
    }
1171034
public function setErrors($errors = array())
    {
        foreach ($errors as $error) {
            if (!$error instanceof ConstraintViolation) {
                throw new \InvalidArgumentException(sprintf('The supplied error is of class "%s", while a "Symfony\Component\Validator\ConstraintViolation" was expected.', get_class($error)));
            }
        }

        $this->errors = $errors;
    }
147019
public function addConstant(ClassConstantGenerator $constant)
    {
        $name = $constant->getName();
        if (isset($this->constants[$name]) === true) {
            throw new InvalidArgumentException('Constant name "' . $name . '" already added.');
        }

        $this->constants[$name] = $constant;
    }
1304309
public function addRequirements(array $requirements)
    {
        if ($requirements) {
            foreach ($this->routes as $route) {
                $route->addRequirements($requirements);
            }
        }
    }
410374
protected function checkRequiredParameters(array $options = null, $requiredParameters = [])
    {
        if (empty($options)) {
            throw new WidgetException('No params found!', $this->getName());
        }

        foreach ($requiredParameters as $parameter) {
            if (empty($options[$parameter])) {
                throw new WidgetParameterException(
                    'Required parameter ' . $parameter . ' not found or invalid!',
                    $this->widgetName,
                    $parameter
                );
            }
        }
    }
1061244
public void addRequiredBundles(String... requiredBundles) {
		String oldBundles = mainAttributes.get(REQUIRE_BUNDLE);
		if (oldBundles == null)
			oldBundles = "";
		BundleList oldResultList = BundleList.fromInput(oldBundles, newline);
		BundleList resultList = BundleList.fromInput(oldBundles, newline);
		for (String bundle : requiredBundles) {
			Bundle newBundle = Bundle.fromInput(bundle);
			if (name != null && name.equals(newBundle.getName()))
				continue;
			resultList.mergeInto(newBundle);
		}
		String result = resultList.toString();
		boolean changed = !oldResultList.toString().equals(result);
		modified |= changed;
		if (changed)
			mainAttributes.put(REQUIRE_BUNDLE, result);
	}
1242673
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'payment_type',
            'remote_ip',
            'amount',
            'currency',
            'return_success_url',
            'return_failure_url',
            'customer_email',
            'billing_country'
        ];

        $this->requiredFields = CommonUtils::createArrayObject($requiredFields);

        $requiredFieldValues = [
            'payment_type'    => PaymentMethods::getMethods(),
            'billing_country' => \Genesis\Utils\Country::getList(),
            'currency'        => \Genesis\Utils\Currency::getList()
        ];

        $this->requiredFieldValues = CommonUtils::createArrayObject($requiredFieldValues);

        $requiredFieldsConditional = [
            'payment_type' => [
                PaymentMethods::GIRO_PAY   => [
                    'bic',
                    'iban'
                ],
                PaymentMethods::PRZELEWY24 => [
                    'customer_email'
                ],
                PaymentMethods::QIWI       => [
                    'account_phone'
                ]
            ]
        ];

        $this->requiredFieldsConditional = CommonUtils::createArrayObject($requiredFieldsConditional);

        $this->setRequiredFieldValuesConditional();
    }
236756
public function setRequired($required)
    {
        if ($required) {
            $this->setAttribute('required', 'required');
        } else {
            $this->removeAttribute('required');
        }
        return parent::setRequired($required);
    }
369030
protected function verifyFieldRequirements()
    {
        if (isset($this->requiredFields)) {
            $this->requiredFields->setIteratorClass('RecursiveArrayIterator');

            $iterator = new \RecursiveIteratorIterator($this->requiredFields->getIterator());

            foreach ($iterator as $fieldName) {
                if (empty($this->$fieldName)) {
                    throw new \Genesis\Exceptions\ErrorParameter(
                        sprintf('Empty (null) required parameter: %s', $fieldName)
                    );
                }
            }
        }
    }
1133453
protected function setRequiredFields()
    {
        $requiredFields = [
            'transaction_id',
            'amount',
            'currency',
            'customer_email',
            'account_name',
            'bank_name',
            'billing_first_name',
            'billing_last_name',
            'billing_address1',
            'billing_city',
            'billing_country',
        ];

        $this->requiredFields = \Genesis\Utils\Common::createArrayObject($requiredFields);

        $requiredFieldValues = [
            'billing_country' => [
                'AD', 'AU', 'AT', 'BH', 'BS', 'BE', 'BG', 'CA', 'CY', 'CZ', 'DK', 'EG', 'EE',
                'FI', 'FR', 'DE', 'GR', 'HK', 'HU', 'ID', 'IE', 'IL', 'IT', 'JP', 'KE', 'LV',
                'LI', 'LT', 'LU', 'MY', 'MT', 'MA', 'NL', 'NZ', 'NO', 'PK', 'PH', 'PL', 'PT',
                'RO', 'SG', 'SK', 'SI', 'ES', 'SE', 'CH', 'GB', 'US', 'VN'
            ],
            'currency'        => \Genesis\Utils\Currency::getList()
        ];

        $this->requiredFieldValues = \Genesis\Utils\Common::createArrayObject($requiredFieldValues);

        $this->setRequiredFieldValuesConditional();
    }
517449
protected function validateRequiredParameters(array $required, array $params)
    {
        foreach ($required as $param) {
            if (!isset($params[$param])) {
                throw new MissingArgumentException(sprintf('The "%s" parameter is required.', $param));
            }
        }
    }