original_string: public function asset($asset, $version = null)
      {
          $host = $this->request->getHost();
          $port = $this->request->getPort();
          $path = $this->request->getBasePath();
  
          if ('/' !== substr($asset, 1)) {
              $asset = '/'.$asset;
          }
  
          if (80 === $port) {
              $port = '';
          } else {
              $port = ':'.$port;
          }
  
          return '//'.$host.$port.$path.$asset;
      }
code: public function asset($asset, $version = null)
      {
          $host = $this->request->getHost();
          $port = $this->request->getPort();
          $path = $this->request->getBasePath();
  
          if ('/' !== substr($asset, 1)) {
              $asset = '/'.$asset;
          }
  
          if (80 === $port) {
              $port = '';
          } else {
              $port = ':'.$port;
          }
  
          return '//'.$host.$port.$path.$asset;
      }
code_tokens: public function asset ( $ asset , $ version = null ) { $ host = $ this -> request -> getHost ( ) ; $ port = $ this -> request -> getPort ( ) ; $ path = $ this -> request -> getBasePath ( ) ; if ( '/' !== substr ( $ asset , 1 ) ) { $ asset = '/' . $ asset ; } if ( 80 === $ port ) { $ port = '' ; } else { $ port = ':' . $ port ; } return '//' . $ host . $ port . $ path . $ asset ; }
docstring: Get the absolute URL of an asset.
  
  @return string
docstring_tokens: Get the absolute URL of an asset .