original_string: public function normalizeParameters(array $parameters)
      {
          $normalized = [];
  
          // [1] Encode both the keys and values.
          // Decode it frist, in case the given data is already encoded.
          foreach ($parameters as $key => $value) {
              $key = rawurlencode(rawurldecode($key));
  
              if (is_array($value)) {
                  $normalized[$key] = $this->normalizeParameters($value);
              } else {
                  $normalized[$key] = rawurlencode(rawurldecode($value));
              }
          }
  
          // [2] Sort by the encoded key.
          ksort($normalized);
  
          return $normalized;
      }
code: public function normalizeParameters(array $parameters)
      {
          $normalized = [];
  
          // [1] Encode both the keys and values.
          // Decode it frist, in case the given data is already encoded.
          foreach ($parameters as $key => $value) {
              $key = rawurlencode(rawurldecode($key));
  
              if (is_array($value)) {
                  $normalized[$key] = $this->normalizeParameters($value);
              } else {
                  $normalized[$key] = rawurlencode(rawurldecode($value));
              }
          }
  
          // [2] Sort by the encoded key.
          ksort($normalized);
  
          return $normalized;
      }
code_tokens: public function normalizeParameters ( array $ parameters ) { $ normalized = [ ] ; // [1] Encode both the keys and values. // Decode it frist, in case the given data is already encoded. foreach ( $ parameters as $ key => $ value ) { $ key = rawurlencode ( rawurldecode ( $ key ) ) ; if ( is_array ( $ value ) ) { $ normalized [ $ key ] = $ this -> normalizeParameters ( $ value ) ; } else { $ normalized [ $ key ] = rawurlencode ( rawurldecode ( $ value ) ) ; } } // [2] Sort by the encoded key. ksort ( $ normalized ) ; return $ normalized ; }
docstring: Normalize the given request parameters.
  
  @param array $parameters
  
  @return array
docstring_tokens: Normalize the given request parameters .