Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Cairns\Radiate\Middleware; |
||
37 | 1 | public function execute($event, callable $next) |
|
38 | { |
||
39 | 1 | foreach ($this->listeners as $listener) { |
|
40 | 1 | $method = $this->inflector->inflect($event, $listener); |
|
41 | |||
42 | 1 | if (! $method) { |
|
43 | continue; |
||
44 | } |
||
45 | |||
46 | 1 | $listener = $this->locator->locate($listener); |
|
47 | |||
48 | 1 | $listener->$method($event); |
|
49 | 1 | } |
|
50 | 1 | } |
|
51 | } |
||
52 |