Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
26 | 2 | public function send($notifiable, Notification $notification) |
|
27 | { |
||
28 | 2 | $to = $notifiable->routeNotificationFor('smscru'); |
|
29 | |||
30 | 2 | if (empty($to)) { |
|
31 | 1 | throw CouldNotSendNotification::missingRecipient(); |
|
32 | } |
||
33 | |||
34 | 1 | $message = $notification->toSmscRu($notifiable); |
|
35 | |||
36 | 1 | if (is_string($message)) { |
|
37 | $message = new SmscRuMessage($message); |
||
38 | } |
||
39 | |||
40 | 1 | $this->sendMessage($to, $message); |
|
41 | 1 | } |
|
42 | |||
58 |