original_string: private static function getHttpTransportAdapter($serverConfig)
      {
          switch ($serverConfig->getHttpTransportMethod()) {
              case HttpTransportMethod::HTTP_TRANSPORT_METHOD_CURL:
                  $adapter = new Apache_Solr_HttpTransport_Curl();
                  break;
              default:
                  $adapter = new Apache_Solr_HttpTransport_FileGetContents();
          }
  
          if ($serverConfig->isUseHttpBasicAuth()) {
              $adapter->setAuthenticationCredentials(
                  $serverConfig->getHttpBasicAuthUsername(),
                  $serverConfig->getHttpBasicAuthPassword()
              );
          }
  
          return $adapter;
      }
code: private static function getHttpTransportAdapter($serverConfig)
      {
          switch ($serverConfig->getHttpTransportMethod()) {
              case HttpTransportMethod::HTTP_TRANSPORT_METHOD_CURL:
                  $adapter = new Apache_Solr_HttpTransport_Curl();
                  break;
              default:
                  $adapter = new Apache_Solr_HttpTransport_FileGetContents();
          }
  
          if ($serverConfig->isUseHttpBasicAuth()) {
              $adapter->setAuthenticationCredentials(
                  $serverConfig->getHttpBasicAuthUsername(),
                  $serverConfig->getHttpBasicAuthPassword()
              );
          }
  
          return $adapter;
      }
code_tokens: private static function getHttpTransportAdapter ( $ serverConfig ) { switch ( $ serverConfig -> getHttpTransportMethod ( ) ) { case HttpTransportMethod :: HTTP_TRANSPORT_METHOD_CURL : $ adapter = new Apache_Solr_HttpTransport_Curl ( ) ; break ; default : $ adapter = new Apache_Solr_HttpTransport_FileGetContents ( ) ; } if ( $ serverConfig -> isUseHttpBasicAuth ( ) ) { $ adapter -> setAuthenticationCredentials ( $ serverConfig -> getHttpBasicAuthUsername ( ) , $ serverConfig -> getHttpBasicAuthPassword ( ) ) ; } return $ adapter ; }
docstring: Create HttpTransportAdapter based on configuration
  
  @param $serverConfig
  @return Apache_Solr_HttpTransport_Abstract
docstring_tokens: Create HttpTransportAdapter based on configuration