original_string: public function buildQueryString(array $parameters, array $initialQueryParameters = [], $previousKey = null)
      {
          $queryParameters = $initialQueryParameters;
  
          foreach ($parameters as $key => $value) {
              if (null !== $previousKey) {
                  $key = "{$previousKey}[{$key}]";
              }
  
              if (is_array($value)) {
                  $queryParameters = $this->buildQueryString($value, $queryParameters, $key);
              } else {
                  $queryParameters[] = "{$key}={$value}";
              }
          }
  
          return null !== $previousKey ? $queryParameters : implode('&', $queryParameters);
      }
code: public function buildQueryString(array $parameters, array $initialQueryParameters = [], $previousKey = null)
      {
          $queryParameters = $initialQueryParameters;
  
          foreach ($parameters as $key => $value) {
              if (null !== $previousKey) {
                  $key = "{$previousKey}[{$key}]";
              }
  
              if (is_array($value)) {
                  $queryParameters = $this->buildQueryString($value, $queryParameters, $key);
              } else {
                  $queryParameters[] = "{$key}={$value}";
              }
          }
  
          return null !== $previousKey ? $queryParameters : implode('&', $queryParameters);
      }
code_tokens: public function buildQueryString ( array $ parameters , array $ initialQueryParameters = [ ] , $ previousKey = null ) { $ queryParameters = $ initialQueryParameters ; foreach ( $ parameters as $ key => $ value ) { if ( null !== $ previousKey ) { $ key = "{$previousKey}[{$key}]" ; } if ( is_array ( $ value ) ) { $ queryParameters = $ this -> buildQueryString ( $ value , $ queryParameters , $ key ) ; } else { $ queryParameters [ ] = "{$key}={$value}" ; } } return null !== $ previousKey ? $ queryParameters : implode ( '&' , $ queryParameters ) ; }
docstring: Build query string from the given parameters.
  
  @param array  $parameters
  @param array  $initialQueryParameters
  @param string $previousKey
  
  @return string
docstring_tokens: Build query string from the given parameters .