original_string: public function setSMSAPICredential($provider, $credentials = array())
      {
          $this->checkCredentialManagementRights();
  
          $smsProviderInstance = SMSProvider::factory($provider);
          $smsProviderInstance->verifyCredential($credentials);
  
          $settings = $this->getCredentialManagerSettings();
  
          $settings[MobileMessaging::PROVIDER_OPTION] = $provider;
          $settings[MobileMessaging::API_KEY_OPTION] = $credentials;
  
          $this->setCredentialManagerSettings($settings);
  
          return true;
      }
code: public function setSMSAPICredential($provider, $credentials = array())
      {
          $this->checkCredentialManagementRights();
  
          $smsProviderInstance = SMSProvider::factory($provider);
          $smsProviderInstance->verifyCredential($credentials);
  
          $settings = $this->getCredentialManagerSettings();
  
          $settings[MobileMessaging::PROVIDER_OPTION] = $provider;
          $settings[MobileMessaging::API_KEY_OPTION] = $credentials;
  
          $this->setCredentialManagerSettings($settings);
  
          return true;
      }
code_tokens: public function setSMSAPICredential ( $ provider , $ credentials = array ( ) ) { $ this -> checkCredentialManagementRights ( ) ; $ smsProviderInstance = SMSProvider :: factory ( $ provider ) ; $ smsProviderInstance -> verifyCredential ( $ credentials ) ; $ settings = $ this -> getCredentialManagerSettings ( ) ; $ settings [ MobileMessaging :: PROVIDER_OPTION ] = $ provider ; $ settings [ MobileMessaging :: API_KEY_OPTION ] = $ credentials ; $ this -> setCredentialManagerSettings ( $ settings ) ; return true ; }
docstring: set the SMS API credential
  
  @param string $provider SMS API provider
  @param array $credentials array with data like API Key or username
  
  @return bool true if SMS API credential were validated and saved, false otherwise
docstring_tokens: set the SMS API credential