original_string: protected function _normalizeData($args, $path = '')
      {
          $data = [];
          foreach ($args as $key => $value) {
              if ($path) {
                  // Fold string keys with [].
                  // Numeric keys result in a=b&a=c. While this isn't
                  // standard behavior in PHP, it is common in other platforms.
                  if (!is_numeric($key)) {
                      $key = "{$path}[{$key}]";
                  } else {
                      $key = $path;
                  }
              }
              if (is_array($value)) {
                  uksort($value, 'strcmp');
                  $data = array_merge($data, $this->_normalizeData($value, $key));
              } else {
                  $data[] = [$key, $value];
              }
          }
  
          return $data;
      }
code: protected function _normalizeData($args, $path = '')
      {
          $data = [];
          foreach ($args as $key => $value) {
              if ($path) {
                  // Fold string keys with [].
                  // Numeric keys result in a=b&a=c. While this isn't
                  // standard behavior in PHP, it is common in other platforms.
                  if (!is_numeric($key)) {
                      $key = "{$path}[{$key}]";
                  } else {
                      $key = $path;
                  }
              }
              if (is_array($value)) {
                  uksort($value, 'strcmp');
                  $data = array_merge($data, $this->_normalizeData($value, $key));
              } else {
                  $data[] = [$key, $value];
              }
          }
  
          return $data;
      }
code_tokens: protected function _normalizeData ( $ args , $ path = '' ) { $ data = [ ] ; foreach ( $ args as $ key => $ value ) { if ( $ path ) { // Fold string keys with []. // Numeric keys result in a=b&a=c. While this isn't // standard behavior in PHP, it is common in other platforms. if ( ! is_numeric ( $ key ) ) { $ key = "{$path}[{$key}]" ; } else { $ key = $ path ; } } if ( is_array ( $ value ) ) { uksort ( $ value , 'strcmp' ) ; $ data = array_merge ( $ data , $ this -> _normalizeData ( $ value , $ key ) ) ; } else { $ data [ ] = [ $ key , $ value ] ; } } return $ data ; }
docstring: Recursively convert request data into the normalized form.
  
  @param array $args The arguments to normalize.
  @param string $path The current path being converted.
  @see https://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
  @return array
docstring_tokens: Recursively convert request data into the normalized form .