src/OAuth/Services/OAuthService.php
private function buildRequestBody(array $request)
    {
        $params = array_reduce(array_keys($request), function ($carry, $key) use($request) {
            $value = $request[$key];
            $carry[$key] = is_array($value) ? implode(' ', $value) : $value;
            return $carry;
        }, []);

        return empty($request) ? '' : http_build_query($params, null, '&', PHP_QUERY_RFC3986);
    }
private function buildRequestBody(array $request)
    {
        $params = array_reduce(array_keys($request), function ($carry, $key) use($request) {
            $value = $request[$key];
            $carry[$key] = is_array($value) ? implode(' ', $value) : $value;
            return $carry;
        }, []);

        return empty($request) ? '' : http_build_query($params, null, '&', PHP_QUERY_RFC3986);
    }
Builds the request body string.

@param array $request Associative array that is the request body.

@return string The request body in URL-encoded format.