Skip to content

Commit

Permalink
Merge pull request #200 from christosku/main
Browse files Browse the repository at this point in the history
Allow declaring custom or multiple notification classes in health.php
  • Loading branch information
freekmurze authored Nov 3, 2023
2 parents a2a5304 + c5e20de commit 4adda72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Commands/RunHealthChecksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Spatie\Health\Events\CheckStartingEvent;
use Spatie\Health\Exceptions\CheckDidNotComplete;
use Spatie\Health\Health;
use Spatie\Health\Notifications\CheckFailedNotification;
use Spatie\Health\ResultStores\ResultStore;

class RunHealthChecksCommand extends Command
Expand Down Expand Up @@ -162,10 +161,10 @@ protected function determineCommandResult(Collection $results): int
}

/**
* @return class-string<CheckFailedNotification>
* @return class-string
*/
protected function getFailedNotificationClass(): string
{
return CheckFailedNotification::class;
return array_key_first(config('health.notifications.notifications'));
}
}

0 comments on commit 4adda72

Please sign in to comment.