Shrink the values of parameters from a combination

@param array $parameters
@param array $combination

@return string
778454
private function shrinkParameters(array $parameters, array $combination)
    {
        array_shift($parameters);
        $result = '';

        $maxLength  = $this->maxCharWidth;
        $maxLength -= count($parameters) * 5;
        $maxLength /= count($parameters);

        foreach ($parameters as $key => $value) {
            $isLarger = false;

            if (strlen($value) > $maxLength) {
                $value = wordwrap($value, $maxLength, "\n", true);
                $value = explode("\n", $value);
                $value = $value[0];

                $isLarger = true;
            }
            $value = self::escapeFunction($value);

            if (! is_numeric($value)) {
                $value = substr($value, 1, -1);
            }

            if ($isLarger) {
                $value .= ' [...]';
            }

            $result .= ' ' . $combination[$key] . ' ' . $value;
        }

        return trim($result);
    }
738279
protected function extractShaSign(array $parameters)
    {
        if (!array_key_exists(self::SHASIGN_FIELD, $parameters) || $parameters[self::SHASIGN_FIELD] == '') {
            throw new InvalidArgumentException('SHASIGN parameter not present in parameters.');
        }
        return $parameters[self::SHASIGN_FIELD];
    }
528006
protected function normalizeProtocolParameters(array $parameters)
    {
        array_walk($parameters, function (&$value, $key) {
            $value = rawurlencode($key).'="'.rawurlencode($value).'"';
        });

        return 'OAuth '.implode(', ', $parameters);
    }
707280
public function setParameters($parameters)
    {
        $this->parameters = [];
        
        foreach ($parameters as $parameter) {
            $this->append($parameter);
        }
        
        return $this;
    }
985033
protected function _replaceParameters($string, array $parameters = array())
    {
        //Adds curly braces around keys to make strtr work in replaceParameters method
        $replace_keys = function ($key) {
            return  '{'.$key.'}';
        };

        $keys       = array_map($replace_keys, array_keys($parameters));
        $parameters = array_combine($keys, $parameters);

        return strtr($string, $parameters);
    }
189616
public static function cleanUpArray(array $parameters)
    {
        $cleanup = [];

        foreach ($parameters as $name => $value) {
            if (array_key_exists($name, self::CONFIRMATION_PROPERTIES)) {
                $cleanup[$name] = $value;
            }
        }

        return $cleanup;
    }
685589
protected function parseNamedParameters($parameters)
    {
        return array_reduce($parameters, function ($result, $item) {
            [$key, $value] = array_pad(explode('=', $item, 2), 2, null);

            $result[$key] = $value;

            return $result;
        });
    }
770708
public function mergeParams($method, Array $params = [])
    {
        $result = parent::mergeParams($method, $params);

        foreach ($this->map as $oldKey => $newKey)
        {
            if (array_key_exists($oldKey, $result[$method])) {
                $result[$method][$newKey] = $result[$method][$oldKey];
                $result[$method][$oldKey] = null;
                unset($result[$method][$oldKey]);
            }
        }

        return $result;
    }
536227
private function parametersToData(array $parameters)
    {
        $data = array();

        foreach ($parameters as $parameter) {
            $data[$parameter->getName()] = $this->parameterToData($parameter);
        }

        return (object) $data;
    }
47200
protected function replaceDefaults(array $parameters)
    {
        foreach ($parameters as $key => &$value) {
            if (! isset($value)) {
                $value = Arr::get($this->defaults, $key);
            }
        }

        return $parameters;
    }
194605
public function removeParameters(array $parameters = null)
  {
    $this->parameters = array();

    if ($parameters) {
      $this->addParameters($parameters);
    }

    return $this;
  }
277980
private function prepareContext($parameters)
    {
        $new = array();
        foreach ($parameters as $name => $value) {
            if (is_array($value)) {
                $subNew = array();
                foreach ($value as $index => $subValue) {
                    $subNew[] = sprintf(
                        '<comment>%s</comment>: <comment>%s</comment>',
                        $index,
                        var_export($subValue, true)
                    );
                }
                $new[$name] = sprintf('[%s]', implode(', ', $subNew));

                continue;
            }
            if (!is_object($value) || method_exists($value, '__toString')) {
                $new[$name] = sprintf('<comment>%s</comment>', $value);

                continue;
            }

            $new[$name] = $value;
        }

        return $new;
    }
1270671
protected function normalizeParameters($parameters)
    {
        $normalized = [];

        foreach ($parameters as $key => $value) {
            // Percent symbols (%) must be double-encoded.
            $key   = $this->encode($key);
            $value = $this->encode($value);

            $normalized[$key] = $value;
        }

        return $normalized;
    }
616600
public function getProviderParameters(array $parameters)
    {
        if (isset($parameters['type'])) {
            unset($parameters['type']);
        }

        if (isset($parameters['aliases'])) {
            unset($parameters['aliases']);
        }

        if (isset($parameters['namespace'])) {
            unset($parameters['namespace']);
        }

        return $parameters;
    }
327367
protected function _params_filter($parameters = array()){
    $params = array();
    foreach($parameters as $key => $val) {
        if ($key == "Signature" ||$val === "" || $val === NULL){
          continue;
        } else {
          $params[$key] = $parameters[$key];
        }
    }
    ksort($params);
    reset($params);
    return $params;
  }
18960
public function formatParameters(array $parameters, $keyString = null, $nested = false)
    {
        foreach ($parameters as $key => $value) {
            if (null !== $keyString && true === $nested) {
                $keyString = sprintf('%s[%s]', $keyString, $key);
            } else {
                $keyString = $key;
            }

            if (is_array($value)) {
                $this->formatParameters($value, $keyString, true);

                continue;
            } else {
                $this->formatedParameters[$keyString] = $value;
            }
        }

        return $this->formatedParameters;
    }
738935
protected function parametersToString(array $parameters)
    {
        $pieces = array();
        foreach ($parameters as $key => $val) {
            $pieces[] = sprintf('"%s": "%s"', $key, (is_string($val) ? $val : json_encode($val)));
        }

        return implode(', ', $pieces);
    }