original_string: protected function buildUrl($path, array $query, $fragment)
      {
          if (! empty($query)) {
              $separator = Str::contains($path, '?') ? '&' : '?';
  
              $path .= $separator .http_build_query($query, '', '&');
          }
  
          if (! empty($fragment)) {
              $path .= '#' .$fragment;
          }
  
          return $path;
      }
code: protected function buildUrl($path, array $query, $fragment)
      {
          if (! empty($query)) {
              $separator = Str::contains($path, '?') ? '&' : '?';
  
              $path .= $separator .http_build_query($query, '', '&');
          }
  
          if (! empty($fragment)) {
              $path .= '#' .$fragment;
          }
  
          return $path;
      }
code_tokens: protected function buildUrl ( $ path , array $ query , $ fragment ) { if ( ! empty ( $ query ) ) { $ separator = Str :: contains ( $ path , '?' ) ? '&' : '?' ; $ path .= $ separator . http_build_query ( $ query , '' , '&' ) ; } if ( ! empty ( $ fragment ) ) { $ path .= '#' . $ fragment ; } return $ path ; }
docstring: Build the full query portion of a URL.
  
  @param  string  $path
  @param  array  $query
  @param  string|null  $fragment
  @return string
docstring_tokens: Build the full query portion of a URL .