original_string: public function buildUrlString($baseUrl, $resource)
      {
          if (null === $baseUrl || '' == $baseUrl) {
              return null;
          }
  
          if (null === $resource || '' == $resource) {
              return $baseUrl;
          }
  
          $baseUrl = $this->removeTrainingSlash($baseUrl);
          if (!substr($resource, 0, 1) == '/') {
              $resource = '/' . $resource;
          }
  
          return $baseUrl . $resource;
      }
code: public function buildUrlString($baseUrl, $resource)
      {
          if (null === $baseUrl || '' == $baseUrl) {
              return null;
          }
  
          if (null === $resource || '' == $resource) {
              return $baseUrl;
          }
  
          $baseUrl = $this->removeTrainingSlash($baseUrl);
          if (!substr($resource, 0, 1) == '/') {
              $resource = '/' . $resource;
          }
  
          return $baseUrl . $resource;
      }
code_tokens: public function buildUrlString ( $ baseUrl , $ resource ) { if ( null === $ baseUrl || '' == $ baseUrl ) { return null ; } if ( null === $ resource || '' == $ resource ) { return $ baseUrl ; } $ baseUrl = $ this -> removeTrainingSlash ( $ baseUrl ) ; if ( ! substr ( $ resource , 0 , 1 ) == '/' ) { $ resource = '/' . $ resource ; } return $ baseUrl . $ resource ; }
docstring: Returns either the concatenated string or null on wrong params.
  
  @param string $baseUrl
  @param string $resource
  @return string|null Null on invalid {$baseUrl}
docstring_tokens: Returns either the concatenated string or null on wrong params .