original_string: private function getBaseUri(DataService $annotation, bool $readonly = false): string
      {
          // Accounts are optional as you need to be able to load an account
          // before you can resolve services.
          if (!($base = $annotation->getBaseUri())) {
              // If no account is specified, we must use the ResolveAllUrls service instead.
              if (!$this->authenticatedClient->hasAccount()) {
                  $resolver = new ResolveAllUrls($this->authenticatedClient, $this->cacheItemPool);
  
                  return $resolver->resolve($annotation->getService($readonly))->getUrl().$annotation->getPath();
              }
  
              $resolved = $this->resolveDomain->resolve($this->authenticatedClient->getAccount());
  
              $base = $resolved->getUrl($annotation->getService($readonly)).$annotation->getPath();
          }
  
          return $base;
      }
code: private function getBaseUri(DataService $annotation, bool $readonly = false): string
      {
          // Accounts are optional as you need to be able to load an account
          // before you can resolve services.
          if (!($base = $annotation->getBaseUri())) {
              // If no account is specified, we must use the ResolveAllUrls service instead.
              if (!$this->authenticatedClient->hasAccount()) {
                  $resolver = new ResolveAllUrls($this->authenticatedClient, $this->cacheItemPool);
  
                  return $resolver->resolve($annotation->getService($readonly))->getUrl().$annotation->getPath();
              }
  
              $resolved = $this->resolveDomain->resolve($this->authenticatedClient->getAccount());
  
              $base = $resolved->getUrl($annotation->getService($readonly)).$annotation->getPath();
          }
  
          return $base;
      }
code_tokens: private function getBaseUri ( DataService $ annotation , bool $ readonly = false ) : string { // Accounts are optional as you need to be able to load an account // before you can resolve services. if ( ! ( $ base = $ annotation -> getBaseUri ( ) ) ) { // If no account is specified, we must use the ResolveAllUrls service instead. if ( ! $ this -> authenticatedClient -> hasAccount ( ) ) { $ resolver = new ResolveAllUrls ( $ this -> authenticatedClient , $ this -> cacheItemPool ) ; return $ resolver -> resolve ( $ annotation -> getService ( $ readonly ) ) -> getUrl ( ) . $ annotation -> getPath ( ) ; } $ resolved = $ this -> resolveDomain -> resolve ( $ this -> authenticatedClient -> getAccount ( ) ) ; $ base = $ resolved -> getUrl ( $ annotation -> getService ( $ readonly ) ) . $ annotation -> getPath ( ) ; } return $ base ; }
docstring: Get the base URI from an annotation or service registry.
  
  @param DataService $annotation The annotation data is being loaded for.
  @param bool        $readonly   (optional) Load from the read-only service.
  
  @return string The base URI.
docstring_tokens: Get the base URI from an annotation or service registry .