Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | public function broadcastOn() |
||
17 | { |
||
18 | $channels = []; |
||
19 | $methods = get_class_methods($this); |
||
20 | foreach ($methods as $method) { |
||
21 | if (strpos($method, 'exportFor') === false) { |
||
22 | continue; |
||
23 | } |
||
24 | $channel = str_replace('exportFor', '', $method); |
||
25 | if (!empty($channel)) { |
||
26 | $channels[] = Inflector::camel2id($channel); |
||
27 | } |
||
28 | } |
||
29 | return $channels; |
||
30 | } |
||
55 | } |