Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
26 | 31 | public function send($notifiable, Notification $notification) |
|
27 | { |
||
28 | 31 | $message = $this->getData($notifiable, $notification); |
|
29 | |||
30 | 31 | $event = new WebNotificationEvent( |
|
31 | 31 | $notifiable, $notification, is_array($message) ? $message : $message->data |
|
32 | ); |
||
33 | |||
34 | 31 | if ($message instanceof BroadcastMessage) { |
|
35 | $event->onConnection($message->connection) |
||
36 | ->onQueue($message->queue); |
||
37 | } |
||
38 | |||
39 | 31 | return $this->events->dispatch($event); |
|
40 | } |
||
42 |