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