Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace Cairns\Radiate; |
||
26 | 1 | public function emit($event) |
|
27 | { |
||
28 | 1 | foreach ($this->listeners as $listener) { |
|
29 | 1 | $method = $this->inflector->inflect($event, $listener); |
|
30 | |||
31 | 1 | if (! method_exists($listener, $method)) { |
|
32 | continue; |
||
33 | } |
||
34 | |||
35 | 1 | $listener->{$method}($event); |
|
36 | 1 | } |
|
37 | 1 | } |
|
38 | } |
||
39 |