Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function send($notifiable, Notification $notification) |
||
29 | { |
||
30 | if (! $userIds = $notifiable->routeNotificationFor('OneSignal')) { |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | $payload = $notification->toOneSignal($notifiable)->toArray(); |
||
|
|||
35 | $payload['include_player_ids'] = collect($userIds); |
||
36 | |||
37 | /** @var ResponseInterface $response */ |
||
38 | $response = $this->oneSignal->sendNotificationCustom($payload); |
||
39 | |||
40 | if ($response->getStatusCode() !== 200) { |
||
41 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 |
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.