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