Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 11016ac

Browse filesBrowse files
committed
chore: set RecipientInterface as typehint of asPushMessage method
1 parent ea35bd2 commit 11016ac
Copy full SHA for 11016ac

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎src/Symfony/Component/Notifier/Bridge/Pusher/PusherNotification.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Pusher/PusherNotification.php
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
use Symfony\Component\Notifier\Message\PushMessage;
1515
use Symfony\Component\Notifier\Notification\Notification;
1616
use Symfony\Component\Notifier\Notification\PushNotificationInterface;
17+
use Symfony\Component\Notifier\Recipient\RecipientInterface;
1718

1819
/**
1920
* @author Yasmany Cubela Medina <yasmanycm@gmail.com>
2021
*/
2122
class PusherNotification extends Notification implements PushNotificationInterface
2223
{
23-
public function asPushMessage(PusherRecipientInterface $recipient, string $transport = null): ?PushMessage
24+
public function asPushMessage(RecipientInterface $recipient, string $transport = null): ?PushMessage
2425
{
25-
return new PushMessage($this->getSubject(), $this->getContent(), new PusherOptions($recipient->getChannels()));
26+
return new PushMessage($this->getSubject(), $this->getContent(), new PusherOptions($recipient instanceof PusherRecipientInterface ? $recipient->getChannels() : []));
2627
}
2728
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.