original_string: public function getAdapter($adapterName,  $arguments = array())
      {
          $stdName = ucfirst($adapterName);
  
          $classAdapterName = CheckoutApi_Client_Constant::ADAPTER_CLASS_GROUP.$stdName;
          
          $class = null;
  
          if (class_exists($classAdapterName)) {
              /** @var CheckoutApi_Client_Adapter_Abstract  $class */
              $class = CheckoutApi_Lib_Factory::getSingletonInstance($classAdapterName,$arguments);
              if(isset($arguments['uri'])) {
                  $class->setUri($arguments['uri']);
              }
  
              if(isset($arguments['config'])) {
                  $class->setConfig($arguments['config']);
              }
  
          } else {
            
              $this->exception("Not a valid Adapter", debug_backtrace());
          } 
  
          return $class;
          
      }
code: public function getAdapter($adapterName,  $arguments = array())
      {
          $stdName = ucfirst($adapterName);
  
          $classAdapterName = CheckoutApi_Client_Constant::ADAPTER_CLASS_GROUP.$stdName;
          
          $class = null;
  
          if (class_exists($classAdapterName)) {
              /** @var CheckoutApi_Client_Adapter_Abstract  $class */
              $class = CheckoutApi_Lib_Factory::getSingletonInstance($classAdapterName,$arguments);
              if(isset($arguments['uri'])) {
                  $class->setUri($arguments['uri']);
              }
  
              if(isset($arguments['config'])) {
                  $class->setConfig($arguments['config']);
              }
  
          } else {
            
              $this->exception("Not a valid Adapter", debug_backtrace());
          } 
  
          return $class;
          
      }
code_tokens: public function getAdapter ( $ adapterName , $ arguments = array ( ) ) { $ stdName = ucfirst ( $ adapterName ) ; $ classAdapterName = CheckoutApi_Client_Constant :: ADAPTER_CLASS_GROUP . $ stdName ; $ class = null ; if ( class_exists ( $ classAdapterName ) ) { /** @var CheckoutApi_Client_Adapter_Abstract  $class */ $ class = CheckoutApi_Lib_Factory :: getSingletonInstance ( $ classAdapterName , $ arguments ) ; if ( isset ( $ arguments [ 'uri' ] ) ) { $ class -> setUri ( $ arguments [ 'uri' ] ) ; } if ( isset ( $ arguments [ 'config' ] ) ) { $ class -> setConfig ( $ arguments [ 'config' ] ) ; } } else { $ this -> exception ( "Not a valid Adapter" , debug_backtrace ( ) ) ; } return $ class ; }
docstring: CheckoutApi_ initialise return an adapter.
  @param $adapterName Adapter Name
  @param array $arguments argument for creating the adapter
  @return CheckoutApi_Client_Adapter_Abstract|null
  @throws Exception
docstring_tokens: CheckoutApi_ initialise return an adapter .