| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function send($notifiable, Notification $notification) |
||
| 34 | { |
||
| 35 | if (! $to = $notifiable->routeNotificationFor('every8d')) { |
||
| 36 | return; |
||
| 37 | } |
||
| 38 | |||
| 39 | $message = $notification->toEvery8d($notifiable); |
||
| 40 | |||
| 41 | if (is_string($message)) { |
||
| 42 | $message = new Every8dMessage($message); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $this->client->send([ |
||
| 46 | 'subject' => $message->subject, |
||
| 47 | 'to' => $to, |
||
| 48 | 'text' => trim($message->content), |
||
| 49 | ]); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |