1 | <?php |
||
12 | class GcmChannel |
||
13 | { |
||
14 | /** @var Client */ |
||
15 | protected $client; |
||
16 | |||
17 | /** @var Dispatcher */ |
||
18 | protected $events; |
||
19 | |||
20 | /** |
||
21 | * @param Client $client |
||
22 | * @param Dispatcher $events |
||
23 | */ |
||
24 | 1 | public function __construct(Client $client, Dispatcher $events) |
|
29 | |||
30 | /** |
||
31 | * Send the notification to Google Cloud Messaging. |
||
32 | * |
||
33 | * @param mixed $notifiable |
||
34 | * @param Notification $notification |
||
35 | * @return void |
||
36 | * |
||
37 | * @throws Exceptions\SendingFailed |
||
38 | */ |
||
39 | 1 | public function send($notifiable, Notification $notification) |
|
63 | |||
64 | /** |
||
65 | * @param $tokens |
||
66 | * @param $message |
||
67 | * |
||
68 | * @return \NotificationChannels\Gcm\Packet |
||
69 | */ |
||
70 | protected function getPacket($tokens, $message) |
||
71 | { |
||
72 | $packet = new Packet(); |
||
73 | |||
74 | $packet->setRegistrationIds($tokens); |
||
75 | $packet->setCollapseKey(str_slug($message->title)); |
||
76 | $packet->setData([ |
||
77 | 'title' => $message->title, |
||
78 | 'message' => $message->message, |
||
79 | ] + $message->data); |
||
80 | $packet->setNotification([ |
||
81 | 'title' => $message->title, |
||
82 | 'body' => $message->message, |
||
83 | 'sound' => $message->sound, |
||
84 | ]); |
||
85 | |||
86 | return $packet; |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @param $notifiable |
||
91 | * @param \Illuminate\Notifications\Notification $notification |
||
92 | * @param $response |
||
93 | */ |
||
94 | protected function handleFailedNotifications($notifiable, Notification $notification, $response) |
||
111 | } |
||
112 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.