Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
32 | 2 | public function send($notifiable, Notification $notification) |
|
33 | { |
||
34 | 2 | if (! $channel = $notifiable->routeNotificationFor('discord')) { |
|
35 | 1 | return; |
|
36 | } |
||
37 | |||
38 | 1 | $message = $notification->toDiscord($notifiable); |
|
39 | |||
40 | 1 | $this->discord->send($channel, [ |
|
41 | 1 | 'content' => $message->body, |
|
42 | 1 | 'embed' => $message->embed, |
|
43 | 1 | ]); |
|
44 | 1 | } |
|
45 | } |
||
46 |