Format given parameters

@param  array  $parameters
@return string
438393
private function buildDirectiveParameters($parameters = array())
    {
        $result = array();

        foreach ($parameters as $key => $value) {
            $result[] = $key.'="'.$value.'"';
        }

        return implode(',', $result);
    }
139010
protected function compileParameters(array $parameters)
    {
        return \implode(
            ' ',
            \array_map(
                function ($value, $key) {
                    return \is_numeric($key) ? $value : "{$key}=" . (\is_numeric($value) ? $value : ProcessUtils::escapeArgument($value));
                },
                $parameters,
                \array_keys($parameters)
            )
        );
    }
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;
        });
    }
518630
public function render(array $parameters = []): string
    {
        return $this->twig->render($this->template, $parameters + $this->parameters);
    }
861460
private function buildQuery(array $parameters)
        {
            // no parameters?
            if(empty($parameters)) {
                return '';
            }

            // encode the keys
            $keys = self::urlencode_rfc3986(array_keys($parameters));

            // encode the values
            $values = self::urlencode_rfc3986(array_values($parameters));

            // reset the parameters
            $parameters = array_combine($keys, $values);

            // sort parameters by key
            uksort($parameters, 'strcmp');

            // loop parameters
            foreach ($parameters as $key => $value) {
                // sort by value
                if(Arrays::is($value)) $parameters[$key] = natsort($value);
            }

            // process parameters
            foreach ($parameters as $key => $value) {
                $chunks[] = $key . '=' . str_replace('%25', '%', $value);
            }

            // return
            return implode('&', $chunks);
        }
202171
protected function parseParameters($parameters)
    {
        $message = isset($parameters[0]) ? $parameters[0] : null;

        $area = isset($parameters[1]) ? $parameters[1] : 'default';

        return [ $message, $area ];
    }
982810
protected function sort(array $parameters)
    {
        uksort(
            $parameters,
            function ($key1, $key2) {
                return strtolower($key1) > strtolower($key2) ? 1 : -1;
            }
        );

        return $parameters;
    }
1169997
protected function format($parameter, $value)
    {
        if ($value) {
            if (is_bool($value)) {
                return strlen($parameter) === 1 ? '-'.$parameter : '--'.$parameter;
            }
            return strlen($parameter) === 1 ? '-'.$parameter.$value : '--'.$parameter.'='.$value;
        }
        return '';
    }
730655
protected function normalize(array $parameters)
    {
        foreach ($parameters as $parameter => $value) {
            if (null !== $this->knownParameters[$parameter]) {
                $parameters[$parameter] = sprintf($this->knownParameters[$parameter], $value);
            }
        }

        return $parameters;
    }
1044017
protected function buildHttpQuery(array $parameters):string
    {
        return http_build_query(
            array_map(
                function ($parameter) {
                    if (! is_bool($parameter)) {
                        return $parameter;
                    }

                    return $parameter ? 'true' : 'false';
                },
                $parameters
            )
        );
    }
1030462
public function encodeParameters(array $parameters) : string
    {
        return str_replace('+/=', '†‡•', base64_encode(serialize($parameters)));
    }
1323176
public function toUrlParams(array $parameters)
    {
        $buff = "";
        foreach ($parameters as $k => $v) {
            if ($k != "sign" && $v != "" && !is_array($v)) {
                $buff .= $k . "=" . $v . "&";
            }
        }

        $buff = trim($buff, "&");
        return $buff;
    }
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);
    }
959839
protected function getFormParams($parameters = array())
    {
        $formParams = $parameters;

        if (!array_key_exists('api_output', $formParams)) {
            $formParams['api_output'] = Api::DEFAULT_OUTPUT;
        }

        if (!array_key_exists('api_key', $formParams)) {
            $formParams['api_key'] = $this->apiKey;
        }

        return $formParams;
    }
680739
function headerText( $parameters = array() )
    {
        $convert = true;
        if ( isset( $parameters['convert'] ) )
            $convert = $parameters['convert'];
        $text = '';
        $headers = $this->headers( $parameters );
        $headerCount = 0;
        foreach ( $headers as $header )
        {
            if ( $headerCount++ > 0 )
                $text .= eZMail::lineSeparator();
            $text .= $this->blankNewlines( $header['name'] ) . ': ';
            $contentText = $this->blankNewlines( $this->contentString( $header['content'] ) );
            $text .= $contentText;
        }
        return $text;
    }
1042595
private function buildParametersString(array $parameters)
    {
        $parameterDefinitions = [];

        /* @var $param \ReflectionParameter */
        foreach ($parameters as $param) {
            $parameterDefinition = '';

            if ($parameterType = $this->getParameterType($param)) {
                $parameterDefinition .= $parameterType . ' ';
            }

            if ($param->isPassedByReference()) {
                $parameterDefinition .= '&';
            }

            if ($param->isVariadic()) {
                $parameterDefinition .= '...';
            }

            $parameterDefinition .= '$' . $param->getName();

            if ($param->isDefaultValueAvailable()) {
                $parameterDefinition .= ' = ' . var_export($param->getDefaultValue(), true);
            }

            $parameterDefinitions[] = $parameterDefinition;
        }

        return implode(', ', $parameterDefinitions);
    }
796617
private function getParameterNamesForParentCall(array $parameters)
    {
        return array_map(
            function (\ReflectionParameter $parameter) {
                $name = '';

                if ($parameter->isVariadic()) {
                    $name .= '...';
                }

                $name .= '$' . $parameter->getName();

                return $name;
            },
            $parameters
        );
    }