diff --git a/src/Command/ImportUsersCommand.php b/src/Command/ImportUsersCommand.php index 1dd9d46..2ac3e5f 100644 --- a/src/Command/ImportUsersCommand.php +++ b/src/Command/ImportUsersCommand.php @@ -40,7 +40,7 @@ class ImportUsersCommand extends Command 'CSV file path' ) ->addOption( - 'check-only', + 'dry-run', null, InputOption::VALUE_NONE, 'If set, command will not perform write operations in the database' @@ -89,7 +89,7 @@ class ImportUsersCommand extends Command $user = new User($row[0], $createdAt, $row[1], $row[2]); - if (!$input->getOption('check-only')) { + if (!$input->getOption('dry-run')) { $this->em->persist($user); $this->em->flush($user); $this->em->detach($user); diff --git a/src/Command/TelegramSendMessageCommand.php b/src/Command/TelegramSendMessageCommand.php index d34d0be..d298839 100644 --- a/src/Command/TelegramSendMessageCommand.php +++ b/src/Command/TelegramSendMessageCommand.php @@ -50,7 +50,7 @@ class TelegramSendMessageCommand extends Command try { $this->messenger->sendMessageToChat( (int) $input->getOption('chat-id'), - $message + $message, ); } catch (\Exception $e) { $io->error($e->getMessage()); diff --git a/src/Command/UpdateSubscriptionsCommand.php b/src/Command/UpdateSubscriptionsCommand.php index 36cebd4..496dcbf 100644 --- a/src/Command/UpdateSubscriptionsCommand.php +++ b/src/Command/UpdateSubscriptionsCommand.php @@ -42,7 +42,7 @@ class UpdateSubscriptionsCommand extends Command 'If set, command will check subscribers of all service users instead of service subscribers only' ) ->addOption( - 'check-only', + 'dry-run', null, InputOption::VALUE_NONE, 'If set, command will not perform write operations in the database' @@ -59,7 +59,7 @@ class UpdateSubscriptionsCommand extends Command $progress = $io->createProgressBar(); $progress->setFormat(ProgressBar::FORMAT_DEBUG); - if (!$input->getOption('check-only')) { // Beginning transaction for all changes + if (!$input->getOption('dry-run')) { // Beginning transaction for all changes $this->em->beginTransaction(); }