Skip to content

Commit

Permalink
Update QuestionCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
yoeriboven committed Jun 12, 2024
1 parent ccd85df commit 1735e08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Console/Commands/QuestionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class QuestionCommand extends Command

public function handle(): void
{
try {
$answer = $this->ask('Do you want to alert users of high heart risk? Only do this when the heart risk calculations have changed. (y/n)');
} catch (\Exception $e) {
$answer = $this->ask('Do you want to alert users of high heart risk? Only do this when the heart risk calculations have changed. (y/n)');

if (! isset($answer)) {
$this->error('Run from the command line.');
}


if (in_array($answer, ['y', 'Y', '1', 'yes'])) {
$this->info('Show notification');
} else {
Expand Down

0 comments on commit 1735e08

Please sign in to comment.