| Conditions | 5 |
| Paths | 4 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function send($notifiable, Notification $notification) |
||
| 31 | { |
||
| 32 | if (empty($notifiable->routeNotificationFor('globeLabsSms'))) { |
||
| 33 | throw new CouldNotSendNotification('Missing method in your notifiable: routeNotificationForGlobeLabs().'); |
||
| 34 | } |
||
| 35 | |||
| 36 | $contactInfo = $notifiable->routeNotificationFor('globeLabsSms'); |
||
| 37 | |||
| 38 | // The contact info should include an access_token and a address |
||
| 39 | if (empty($contactInfo['access_token']) || empty($contactInfo['address'])) { |
||
| 40 | throw new CouldNotSendNotification('Missing variables from your routeNotificationForGlobeLabs().'); |
||
| 41 | } |
||
| 42 | |||
| 43 | $message = $notification->toGlobeLabsSms($notifiable); |
||
|
|
|||
| 44 | |||
| 45 | try { |
||
| 46 | $this->client->request('POST', $message->getApiSendUrl(), [ |
||
| 47 | 'body' => $message->toJson(), |
||
| 48 | ]); |
||
| 49 | } catch (GuzzleException $exception) { |
||
| 50 | throw new CouldNotSendNotification($exception->getMessage()); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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.