Process depends and params

@param array $params
@param array $neighbouring_values
@param array $options
@param boolean $flag_params
355751
public function processParamsAndDepends(& $params, & $neighbouring_values, $options, $flag_params = true) {
		foreach ($params as $k => $v) {
			if (is_array($v)) continue;
			// if we have a parent
			if (strpos($v, 'parent::') !== false) { // value from parent
				$field = str_replace(['parent::', 'static::'], '', $v);
				if (!empty($this->errors['fields'][$field]['danger'])) {
					$params[$k] = null;
				} else {
					$params[$k] = $this->values[$field] ?? null;
				}
			} else if (strpos($v, 'detail::') !== false) { // if we need to grab value from detail
				$field = str_replace('detail::', '', $v);
				$params[$k] = $neighbouring_values[$field] ?? $options['options']['__detail_values'][$field] ?? null;
			} else if ($flag_params) {
				// todo process errors
				// todo process details
				if (!empty($this->fields[$v]['options']['multiple_column']) && is_array(current($neighbouring_values[$v] ?? []))) {
					$params[$k] = array_extract_values_by_key($neighbouring_values[$v] ?? [], $this->fields[$v]['options']['multiple_column']);
				} else {
					$params[$k] = $neighbouring_values[$v] ?? null;
				}
			}
		}
	}
955725
public function setParams(array $params = null)
    {
        $this->params = $params;
        if (null !== $params && empty($params)) {
            $this->params = null;
        }
    }
515851
def FlagValues(*params)
      if params.size==1 && params.first.kind_of?(FlagValues)
        params.first
      else
        FlagValues.new(*params)
      end
    end
1048515
private function setCostFromParams(array $params)
    {
        $cost = (int)$this->getMatchingData($params, '/^[0-9]{1,2}$/');
        $this->cost = (! empty($cost)) ? (string)$cost : self::DEFAULT_COST;
    }
32708
protected function processGetValue($value, $params = [], $processCallbacks = true)
    {
        return $processCallbacks ? $this->processCallback($this->onGetCallback, $value, $params) : $value;
    }
385129
public function setParams( $params )
    {
        if ( $params instanceof Traversable )
        {
            $params = iterator_to_array( $params );
        }
        else if ( is_object( $params ) && ! $params instanceof ArrayAccess )
        {
            $params = (array) $params;
        }

        return parent::setParams( $params );
    }
1375001
public function containerItemsProcFunc(array &$params)
    {
        $this->init($params['row']['pid']);
        $possibleContainers = [];
        $this->removeItemsFromListOfSelectableContainers($params, $possibleContainers);

        if (!empty($possibleContainers)) {
            $params['items'] = array_merge($params['items'], $possibleContainers);
        }
        $itemUidList = '';
        if (count($params['items']) > 1) {
            foreach ($params['items'] as $container) {
                if ($container[1] > 0) {
                    $itemUidList .= $itemUidList ? ',' . $container[1] : $container[1];
                }
            }
        }

        if ($itemUidList) {
            $this->deleteDisallowedContainers($params, $itemUidList);
        }
    }
885357
def post_process(relations, opts)
      Process::CircularDeps.new(relations).process_all!
      Process::InheritDoc.new(relations).process_all!
      Process::Versions.new(relations, opts).process_all!
      Process::ReturnValues.new(relations).process_all!
      Process::Fires.new(relations).process_all!
      Process::Components.new(relations).process_all!
      Process::Lint.new(relations).process_all!
      Process::NoDoc.new(relations).process_all!
      relations
    end
434015
public function getValue($params = [], $processCallbacks = true)
    {
        foreach ($this->defaultParams as $i => $defaultValue) {
            if (!isset($params[$i])) {
                $params[$i] = $defaultValue;
            }
        }

        // In case the value of this dynamic attribute is stored to DB, we pass the stored value as the last parameter to the function
        $params[] = $this->storedValue;
        $value = call_user_func_array($this->callable, $params);

        return $this->processGetValue($value, [], $processCallbacks);
    }
1285145
protected function processDefinitionParameters(array $params, stdClass $definition) {
		foreach ($params as $param) {
			$name = $param->getName();
			
			if ($name === 'arguments') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->arguments = $this->processArguments($content);
				}
				continue;
			}
			
			if ($name === 'calls') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->calls = $this->processCalls($content);
				}
				continue;
			}
			
			throw new InvalidConfig('Unknown element "' . $param->getName() . '" in service devinition', null, null, $param);
		}
	}
1122987
protected function _normalizeParams(array &$params)
    {
        ksort($params, \SORT_STRING);
        array_walk($params, function (&$value) {
            if (is_numeric($value)) {
                $value = (string)$value;
            }
        });

        if (isset($params['?'])) {
            $this->_normalizeParams($params['?']);
        }
    }
506889
protected function setParams(array $params) {
		parent::setParams($params);
		$ref = $this->relative ? str_replace('(%s)://', '(?:(%s)://)?', $this->ref) : $this->ref;
		$this->ref = sprintf($ref, implode('|', $this->protocols));
	}
202340
private static function _checkParams(array $params) : void
    {
        // check existence of mandatory parameters

        // driver
        if (! isset($params['driver']) && ! isset($params['driverClass'])) {
            throw DBALException::driverRequired();
        }

        // check validity of parameters

        // driver
        if (isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) {
            throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap));
        }

        if (isset($params['driverClass']) && ! in_array(Driver::class, class_implements($params['driverClass'], true))) {
            throw DBALException::invalidDriverClass($params['driverClass']);
        }
    }
688244
public function optionalParameters($params = null)
  {
    if (null === $params)
    {
      return $this->responseConfig['optionalParameters'];
    }

    if (false === is_array($params))
    {
      throw new InvalidArgumentException(sprintf(
        "%s is no valid parameter: Use an array with Key => Value Pairs", $params
      ));
    }

    $this->responseConfig['optionalParameters'] = $params;

    return $this;
  }
520862
public function setParams($params): void
    {
        if (! \is_array($params) && ! $params instanceof \ArrayAccess) {
            throw new \InvalidArgumentException('Event params are invalid. Expected type is array or \\ArrayAccess. Got ' . \gettype($params));
        }

        $this->params = $params;
    }
816451
protected function setDefaultValues(array $params, ParameterBag $values)
    {
        foreach ($params as $param) {
            if (!array_key_exists('default', $param) || null === $param['default']) {
                continue;
            }

            if (false === $values->has($param['name'])) {
                $values->set($param['name'], $param['default']);
            }
        }
    }
269333
public function checkOnceValidParamExists(array $requiredParams, array $values, $message = null)
    {
        $this->checkEmptyParams($requiredParams, 'exception_any_parameter_given_to_AlValidatorn');
        $this->checkEmptyParams($values, 'exception_any_value_to_check_when_only_a_param_exists');

        $diff = array_intersect_key($requiredParams, $values);
        if (empty($diff)) {
            if (null === $message) {
                $message = array(
                    'message' => 'exception_any_valid_option_provided',
                    'parameters' => array(
                        '%required%' => $this->doImplode($requiredParams),
                        '%values%' => $this->doImplode($values),
                    ),
                );

                $message = json_encode($message);
            }

            throw new General\ArgumentExpectedException($message);
        }
    }