Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/MailjetEmailChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace YieldStudio\LaravelMailjetNotifier;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Notifications\Notification;

class MailjetEmailChannel
Expand All @@ -24,12 +25,9 @@ public function __construct(MailjetService $mailjetService)
}

/**
* @param Model $notifiable
* @param Notification $notification
*
* @throws MailjetException
*/
public function send(Model $notifiable, Notification $notification): void
public function send(Model|AnonymousNotifiable $notifiable, Notification $notification): void
{
$message = $notification->toMailjetEmail($notifiable); // @phpstan-ignore-line

Expand Down
6 changes: 2 additions & 4 deletions src/MailjetSmsChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace YieldStudio\LaravelMailjetNotifier;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\AnonymousNotifiable;
use Illuminate\Notifications\Notification;

final class MailjetSmsChannel
Expand All @@ -24,12 +25,9 @@ public function __construct(MailjetService $mailjetService)
}

/**
* @param Model $notifiable
* @param Notification $notification
*
* @throws MailjetException
*/
public function send(Model $notifiable, Notification $notification): void
public function send(Model|AnonymousNotifiable $notifiable, Notification $notification): void
{
$message = $notification->toMailjetSms($notifiable); // @phpstan-ignore-line

Expand Down