Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function send($notifiable, Notification $notification) |
||
31 | { |
||
32 | if (method_exists($notification, 'to46Elks')) { |
||
33 | if ($media = $notification->to46Elks($notifiable)) { |
||
34 | try { |
||
35 | return $media->send(); |
||
36 | } catch (\Exception $e) { |
||
37 | $this->events->dispatch(new NotificationFailed($notifiable, $notification, get_class($this), ['exception' => $e])); |
||
38 | } |
||
39 | } |
||
40 | } else { |
||
41 | throw CouldNotUseNotification::missingMethod(); |
||
42 | } |
||
43 | |||
44 | return false; |
||
45 | } |
||
47 |