Skip to content

Commit

Permalink
Don't use the helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightwatson committed Dec 24, 2023
1 parent 3cdf1e4 commit 5291e6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FcmChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function send(mixed $notifiable, Notification $notification): ?Collection

$fcmMessage = $notification->toFcm($notifiable);

return collect($tokens)
return Collection::make($tokens)
->chunk(self::TOKENS_PER_REQUEST)
->map(fn ($tokens) => ($fcmMessage->client ?? $this->client)->sendMulticast($fcmMessage, $tokens->all()))
->map(fn (MulticastSendReport $report) => $this->checkReportForFailures($notifiable, $notification, $report));
Expand All @@ -52,7 +52,7 @@ public function send(mixed $notifiable, Notification $notification): ?Collection
*/
protected function checkReportForFailures(mixed $notifiable, Notification $notification, MulticastSendReport $report): MulticastSendReport
{
collect($report->getItems())
Collection::make($report->getItems())
->filter(fn (SendReport $report) => $report->isFailure())
->each(fn (SendReport $report) => $this->dispatchFailedNotification($notifiable, $notification, $report));

Expand Down

0 comments on commit 5291e6a

Please sign in to comment.