original_string: protected function buildUri(array $parts)
      {
          $uri = 
              ($parts['scheme'] ? "{$parts['scheme']}:" : '') . 
              ($parts['user'] || $parts['host'] ? '//' : '') . 
              ($parts['user'] ? "{$parts['user']}" : '') . 
              ($parts['user'] && $parts['pass'] ? ":{$parts['pass']}" : '') . 
              ($parts['user'] ? '@' : '') . 
              ($parts['host'] ? "{$parts['host']}" : '') . 
              ($parts['port'] ? ":{$parts['port']}" : '');
              
          $uri .=
              ($uri && $parts['path'] && $parts['path'][0] !== '/' ? '/' : '') .
              ($parts['path'] ? "{$parts['path']}" : '') . 
              ($parts['query'] ? "?{$parts['query']}" : '') . 
              ($parts['fragment'] ? "#{$parts['fragment']}" : '');
              
          return $uri;
      }
code: protected function buildUri(array $parts)
      {
          $uri = 
              ($parts['scheme'] ? "{$parts['scheme']}:" : '') . 
              ($parts['user'] || $parts['host'] ? '//' : '') . 
              ($parts['user'] ? "{$parts['user']}" : '') . 
              ($parts['user'] && $parts['pass'] ? ":{$parts['pass']}" : '') . 
              ($parts['user'] ? '@' : '') . 
              ($parts['host'] ? "{$parts['host']}" : '') . 
              ($parts['port'] ? ":{$parts['port']}" : '');
              
          $uri .=
              ($uri && $parts['path'] && $parts['path'][0] !== '/' ? '/' : '') .
              ($parts['path'] ? "{$parts['path']}" : '') . 
              ($parts['query'] ? "?{$parts['query']}" : '') . 
              ($parts['fragment'] ? "#{$parts['fragment']}" : '');
              
          return $uri;
      }
code_tokens: protected function buildUri ( array $ parts ) { $ uri = ( $ parts [ 'scheme' ] ? "{$parts['scheme']}:" : '' ) . ( $ parts [ 'user' ] || $ parts [ 'host' ] ? '//' : '' ) . ( $ parts [ 'user' ] ? "{$parts['user']}" : '' ) . ( $ parts [ 'user' ] && $ parts [ 'pass' ] ? ":{$parts['pass']}" : '' ) . ( $ parts [ 'user' ] ? '@' : '' ) . ( $ parts [ 'host' ] ? "{$parts['host']}" : '' ) . ( $ parts [ 'port' ] ? ":{$parts['port']}" : '' ) ; $ uri .= ( $ uri && $ parts [ 'path' ] && $ parts [ 'path' ] [ 0 ] !== '/' ? '/' : '' ) . ( $ parts [ 'path' ] ? "{$parts['path']}" : '' ) . ( $ parts [ 'query' ] ? "?{$parts['query']}" : '' ) . ( $ parts [ 'fragment' ] ? "#{$parts['fragment']}" : '' ) ; return $ uri ; }
docstring: Build a uri from all the parts
  
  @param array $parts
  @return type
docstring_tokens: Build a uri from all the parts