Conditions | 6 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function getHandlers(string $channel): \Generator |
||
44 | { |
||
45 | if (empty($this->config['handlers'][$channel])) { |
||
46 | return; |
||
47 | } |
||
48 | |||
49 | foreach ($this->config['handlers'][$channel] as $handler) { |
||
50 | if (is_object($handler) && !$handler instanceof Autowire) { |
||
51 | yield $handler; |
||
52 | continue; |
||
53 | } |
||
54 | |||
55 | $wire = $this->wire($channel, $handler); |
||
56 | if (!empty($wire)) { |
||
57 | yield $wire; |
||
58 | } |
||
86 |