Skip to content

Commit

Permalink
Merge pull request #3 from ymcatwincities/fix_messages
Browse files Browse the repository at this point in the history
fix(docs): Fix messages
  • Loading branch information
danylevskyi authored Jun 11, 2021
2 parents a1a6005 + e744000 commit bb27f38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Commands/YmcaSyncCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function enable($syncer) {
$activeSyncers = $config->get('active_syncers');
$syncers = \Drupal::service('ymca_sync.sync_repository')->getSyncers();
if (in_array($syncer, $activeSyncers)) {
$this->logger()->info(sprintf('Syncer %s already activated.', $syncer));
$this->logger()->info(sprintf('Syncer %s is already activated.', $syncer));
return;
}
if (!in_array($syncer, $syncers)) {
Expand All @@ -98,7 +98,7 @@ public function enable($syncer) {
$config->set('active_syncers', $activeSyncers);
$config->save();
$configFactory->reset('ymca_sync.settings');
$this->logger()->info(sprintf('Syncer %s activated.', $syncer));
$this->logger()->info(sprintf('Syncer %s has been activated.', $syncer));
}

/**
Expand All @@ -123,15 +123,15 @@ public function disable($syncer) {
return;
}
if (!in_array($syncer, $activeSyncers)) {
$this->logger()->info(sprintf('Syncer %s already disable.', $syncer));
$this->logger()->info(sprintf('Syncer %s is already disabled.', $syncer));
return;
}
$syncerToDisable = [$syncer];
$activeSyncers = array_diff($activeSyncers, $syncerToDisable);
$config->set('active_syncers', $activeSyncers);
$config->save();
$configFactory->reset('ymca_sync.settings');
$this->logger()->info(sprintf('Syncer %s disabled.', $syncer));
$this->logger()->info(sprintf('Syncer %s has been disabled.', $syncer));
}

}

0 comments on commit bb27f38

Please sign in to comment.