@param array $defaults

@return \Generated\Shared\Transfer\PayoneStandardParameterTransfer
4931
protected function createStandardParameter(array $defaults)
    {
        $standardParameterTransfer = new PayoneStandardParameterTransfer();
        $standardParameterTransfer->fromArray($defaults);

        $payoneConfig = Config::get(PayoneConstants::PAYONE);
        $standardParameterTransfer->setAid($payoneConfig[PayoneConstants::PAYONE_CREDENTIALS_AID]);
        $standardParameterTransfer->setMid($payoneConfig[PayoneConstants::PAYONE_CREDENTIALS_MID]);
        $standardParameterTransfer->setPortalId($payoneConfig[PayoneConstants::PAYONE_CREDENTIALS_PORTAL_ID]);
        $standardParameterTransfer->setKey($payoneConfig[PayoneConstants::PAYONE_CREDENTIALS_KEY]);
        $standardParameterTransfer->setEncoding($payoneConfig[PayoneConstants::PAYONE_CREDENTIALS_ENCODING]);
        $standardParameterTransfer->setResponseType(PayoneApiConstants::RESPONSE_TYPE_JSON);

        return $standardParameterTransfer;
    }
92890
public static function defaults(array $arr = null, array $defaults): array
    {
        if ($arr === null) {
            return $defaults;
        }
        foreach ($defaults as $key => $value) {
            if (!isset($arr[$key])) {
                $arr[$key] = $value;
            }
        }
        return $arr;
    }
714546
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createMerchantDataImport()->import($dataImporterConfigurationTransfer);
    }
1203631
protected function initDefaults($defaults)
    {
        if (!$defaults) {
            return;
        }

        $defaults = $this->fetchParameters($defaults);
        $this->initDefaultsInConfigArray($defaults);
    }
1152878
public function addDefaults(array $defaults)
    {
        if ($defaults) {
            foreach ($this->routes as $route) {
                $route->addDefaults($defaults);
            }
        }
    }
1331698
public static function fromArray(Array $parameters)
    {
        $host = isset($parameters['host']) ? $parameters['host'] : self::DEFAULT_HOST;
        $port = isset($parameters['port']) ? $parameters['port'] : self::DEFAULT_PORT;
        $user = isset($parameters['username']) ? $parameters['username'] : null;
        $pass = isset($parameters['password']) ? $parameters['password'] : null;
        $db = isset($parameters['database']) ? $parameters['database'] : null;

        return new self($host, $port, $user, $pass, $db);
    }
771707
public function attributable(array $attributes, array $defaults = []): string
    {
        return $this->attributes($this->decorate($attributes, $defaults));
    }
161105
public function getMany(array $keys, $default = null)
    {
        $keys = array_fill_keys($keys, $default);

        if (! method_exists($this->store, 'getMany')) {
            return array_combine(array_keys($keys), array_map([$this, 'get'], array_keys($keys), array_values($keys)));
        }

        $values = array_combine(array_keys($keys), $this->store->getMany(array_keys($keys)));

        foreach ($values as $key => &$value) {
            if (is_null($value)) {
                $this->fireCacheEvent('missed', [$key]);

                $value = value(array_get($keys, $key, $default));
            } else {
                $this->fireCacheEvent('hit', [$key, $value]);
            }
        }

        return $values;
    }
1362074
public static function set( $configs, $defaults = null ) {
		$defaults = $defaults ? $defaults : self::get();

		/**
		 * Allow the default configs to be filtered.
		 *
		 * @since 2.8.0
		 *
		 * @param array $defaults
		 */
		$defaults = apply_filters( 'Boldgrid\Library\Configs\set', $defaults );

		// Check if local library file is added.
		$localPath = dirname( __DIR__ ) . '/library.local.php';
		if ( file_exists( $localPath ) && is_readable( $localPath ) ) {
			$local = include_once $localPath;
			$defaults = wp_parse_args( $local, $defaults );
		}

		// Check if constant is added.
		if ( defined( 'BGLIB_CONFIGS' ) ) {
			$localPath = ABSPATH . BGLIB_CONFIGS;
			if ( file_exists( $localPath ) && is_readable( $localPath ) ) {
				$local = include_once $localPath;
				$defaults = wp_parse_args( $local, $defaults );
			}
		}

		return self::$configs = wp_parse_args( $configs, $defaults );
	}
590173
public function setOptions(array $options, array $defaults = [])
    {
        $options = array_merge($defaults, $options);
        $this->options = $options;

        return $this;
    }
1126386
protected function mergeDefaults(array $defaults, $level = '')
    {
        foreach ($defaults as $key => $value) {
            if (is_array($value)) {
                $original = $this->getIfExists(ltrim("$level.$key", "."));
                if (is_array($original)) {
                    $this->mergeDefaults($value, "$level.$key");
                } elseif ($original instanceof NoItemFoundMessage) {
                    $this->set(ltrim("$level.$key", "."), $value);
                }
            } else {
                if (!$this->exists(ltrim("$level.$key", "."))) {
                    $this->set(ltrim("$level.$key", "."), $value);
                }
            }
        }
    }
1146901
public function refLink($defaults = []) : Model
    {
        return $this->getModel($defaults)
            ->addCondition(
                $this->their_field ?: ($this->owner->table.'_'.($this->owner->id_field ?: 'id')),
                $this->referenceOurValue()
            );
    }
1172489
public function importCompanyUserRoles(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createCompanyUserRoleDataImport()->import($dataImporterConfigurationTransfer);
    }
1192550
public function addDefaults(array $defaults)
    {
        foreach ($defaults as $name => $default) {
            $this->defaults[$name] = $default;
        }
        $this->compiled = null;

        return $this;
    }
711805
private function createMin(array $defaults): Min
    {
        $options = ['min' => $defaults['min']];

        if (array_key_exists('minMessage', $defaults)) {
            $options['message'] = $defaults['minMessage'];
        }

        return new Min($options);
    }
201735
protected function mergeAttributesWith( array $defaults )
	{
		// similar to array_merge except overwrite empty values
		foreach( $defaults as $key => $value ) {
			if( isset( $this->args[ $key ] ) && !empty( $this->args[ $key ] ))continue;
			$this->args[ $key ] = $value;
		}

		$attributes = $this->args['attributes'];

		// prioritize $attributes over $this->args, don't worry about duplicates
		return array_merge( $this->args, $attributes );
	}
1139586
public function queries(array $names, $default = null) {
        $var = [];
        
        foreach ($names as $in) {
            $var[$in] = isset($this->_queries[$in]) ? 
                $this->_queries[$in] :
                $default;
        }
        
        return $var;
    }