| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function send($notifiable, Notification $notification) |
||
| 34 | { |
||
| 35 | if (! $url = $notifiable->routeNotificationFor('Webhook')) { |
||
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | $webhookData = $notification->toWebhook($notifiable)->toArray(); |
||
|
|
|||
| 40 | |||
| 41 | $response = $this->client->post($url, [ |
||
| 42 | 'body' => json_encode(Arr::get($webhookData, 'data')), |
||
| 43 | 'verify' => false, |
||
| 44 | 'headers' => Arr::get($webhookData, 'headers'), |
||
| 45 | ]); |
||
| 46 | |||
| 47 | if ($response->getStatusCode() !== 200) { |
||
| 48 | throw CouldNotSendNotification::serviceRespondedWithAnError($response); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
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.