| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function process(Message $message): void |
||
| 40 | { |
||
| 41 | $subscribers = $this->subscriberRepository->findAllByEvent($message->type(), true); |
||
| 42 | |||
| 43 | foreach ($subscribers as $subscriber) { |
||
| 44 | $job = new ProcessWebhook(new Webhook($message, $subscriber->url())); |
||
| 45 | |||
| 46 | if ($this->dispatcher instanceof QueueingDispatcher && $this->queue) { |
||
| 47 | $job->onQueue($this->queue); |
||
| 48 | $this->dispatcher->dispatchToQueue($job); |
||
| 49 | } else { |
||
| 50 | $this->dispatcher->dispatch($job); |
||
| 51 | } |
||
| 55 |