original_string: private static function addParams($url, array $params = array())
      {
          $cParams = count($params);
  
          if ($cParams > 0) {
              $url .= '?';
              $idx = 1;
              foreach ($params as $key => $value) {
                  $url .= $key.'='.$value;
                  if ($idx < $cParams) {
                      $url .= '&';
                  }
                  ++$idx;
              }
          }
  
          return $url;
      }
code: private static function addParams($url, array $params = array())
      {
          $cParams = count($params);
  
          if ($cParams > 0) {
              $url .= '?';
              $idx = 1;
              foreach ($params as $key => $value) {
                  $url .= $key.'='.$value;
                  if ($idx < $cParams) {
                      $url .= '&';
                  }
                  ++$idx;
              }
          }
  
          return $url;
      }
code_tokens: private static function addParams ( $ url , array $ params = array ( ) ) { $ cParams = count ( $ params ) ; if ( $ cParams > 0 ) { $ url .= '?' ; $ idx = 1 ; foreach ( $ params as $ key => $ value ) { $ url .= $ key . '=' . $ value ; if ( $ idx < $ cParams ) { $ url .= '&' ; } ++ $ idx ; } } return $ url ; }
docstring: Appends GET parameters to url.
  
  @param string $url
  @param array  $params Assosiative array in format [key => value ] for GET parameters
  
  @return string
docstring_tokens: Appends GET parameters to url .