| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 2 | public function send($notifiable, Notification $notification) |
|
| 26 | { |
||
| 27 | 2 | $message = $notification->toMessagebird($notifiable); |
|
| 28 | |||
| 29 | 2 | if (is_string($message)) { |
|
| 30 | 1 | $message = MessagebirdMessage::create($message); |
|
| 31 | 1 | } |
|
| 32 | |||
| 33 | 2 | if ($to = $notifiable->routeNotificationFor('messagebird')) { |
|
| 34 | 2 | $message->setRecipients($to); |
|
| 35 | 2 | } |
|
| 36 | |||
| 37 | 2 | $this->client->send($message); |
|
| 38 | 2 | } |
|
| 39 | } |
||
| 40 |