original_string: protected function _normalizedParams($request, $oauthValues)
      {
          $query = parse_url($request->getUri(), PHP_URL_QUERY);
          parse_str($query, $queryArgs);
  
          $post = [];
          $body = $request->body();
          if (is_string($body) && $request->getHeaderLine('content-type') === 'application/x-www-form-urlencoded') {
              parse_str($body, $post);
          }
          if (is_array($body)) {
              $post = $body;
          }
  
          $args = array_merge($queryArgs, $oauthValues, $post);
          $pairs = $this->_normalizeData($args);
          $data = [];
          foreach ($pairs as $pair) {
              $data[] = implode('=', $pair);
          }
          sort($data, SORT_STRING);
  
          return implode('&', $data);
      }
code: protected function _normalizedParams($request, $oauthValues)
      {
          $query = parse_url($request->getUri(), PHP_URL_QUERY);
          parse_str($query, $queryArgs);
  
          $post = [];
          $body = $request->body();
          if (is_string($body) && $request->getHeaderLine('content-type') === 'application/x-www-form-urlencoded') {
              parse_str($body, $post);
          }
          if (is_array($body)) {
              $post = $body;
          }
  
          $args = array_merge($queryArgs, $oauthValues, $post);
          $pairs = $this->_normalizeData($args);
          $data = [];
          foreach ($pairs as $pair) {
              $data[] = implode('=', $pair);
          }
          sort($data, SORT_STRING);
  
          return implode('&', $data);
      }
code_tokens: protected function _normalizedParams ( $ request , $ oauthValues ) { $ query = parse_url ( $ request -> getUri ( ) , PHP_URL_QUERY ) ; parse_str ( $ query , $ queryArgs ) ; $ post = [ ] ; $ body = $ request -> body ( ) ; if ( is_string ( $ body ) && $ request -> getHeaderLine ( 'content-type' ) === 'application/x-www-form-urlencoded' ) { parse_str ( $ body , $ post ) ; } if ( is_array ( $ body ) ) { $ post = $ body ; } $ args = array_merge ( $ queryArgs , $ oauthValues , $ post ) ; $ pairs = $ this -> _normalizeData ( $ args ) ; $ data = [ ] ; foreach ( $ pairs as $ pair ) { $ data [ ] = implode ( '=' , $ pair ) ; } sort ( $ data , SORT_STRING ) ; return implode ( '&' , $ data ) ; }
docstring: Sorts and normalizes request data and oauthValues
  
  Section 9.1.1 of Oauth spec.
  
  - URL encode keys + values.
  - Sort keys & values by byte value.
  
  @param \Cake\Http\Client\Request $request The request object.
  @param array $oauthValues Oauth values.
  @return string sorted and normalized values
docstring_tokens: Sorts and normalizes request data and oauthValues