Use better name for the method that updates api keys states

[MAILPOET-5191]
This commit is contained in:
Rostislav Wolny
2023-05-01 17:10:58 +02:00
committed by Veljko V
parent f4ae6e0f00
commit edc4ab4f52
3 changed files with 3 additions and 3 deletions

View File

@@ -150,7 +150,7 @@ class Settings extends APIEndpoint {
// when pending approval, leave this to cron / Key Activation tab logic
if (!$this->servicesChecker->isMailPoetAPIKeyPendingApproval()) {
$this->settingsChangeHandler->updateBridge($settings);
$this->settingsChangeHandler->updateApiKeyState($settings);
}
$meta = $this->authorizedEmailsController->onSettingsSave($settings);

View File

@@ -91,7 +91,7 @@ class SettingsChangeHandler {
return $task;
}
public function updateBridge($settings) {
public function updateApiKeyState($settings) {
$apiKey = $settings[Mailer::MAILER_CONFIG_SETTING_NAME]['mailpoet_api_key'] ?? null;
$premiumKey = $settings['premium']['premium_key'] ?? null;
if (!empty($apiKey)) {

View File

@@ -122,7 +122,7 @@ class SettingsChangeHandlerTest extends \MailPoetTest {
'subscribersCountReporter' => $countReporterMock,
]);
$changeHandler->updateBridge($settings);
$changeHandler->updateApiKeyState($settings);
}
private function getScheduledTaskByType(string $type): ?ScheduledTaskEntity {