Skip to content

Commit 5291e6a

Browse files
committed
Don't use the helper function
1 parent 3cdf1e4 commit 5291e6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FcmChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function send(mixed $notifiable, Notification $notification): ?Collection
4141

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

44-
return collect($tokens)
44+
return Collection::make($tokens)
4545
->chunk(self::TOKENS_PER_REQUEST)
4646
->map(fn ($tokens) => ($fcmMessage->client ?? $this->client)->sendMulticast($fcmMessage, $tokens->all()))
4747
->map(fn (MulticastSendReport $report) => $this->checkReportForFailures($notifiable, $notification, $report));
@@ -52,7 +52,7 @@ public function send(mixed $notifiable, Notification $notification): ?Collection
5252
*/
5353
protected function checkReportForFailures(mixed $notifiable, Notification $notification, MulticastSendReport $report): MulticastSendReport
5454
{
55-
collect($report->getItems())
55+
Collection::make($report->getItems())
5656
->filter(fn (SendReport $report) => $report->isFailure())
5757
->each(fn (SendReport $report) => $this->dispatchFailedNotification($notifiable, $notification, $report));
5858

0 commit comments

Comments
 (0)