Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
45 | private function call($index) |
||
46 | { |
||
47 | if (!isset($this->middlewares[$index])) { |
||
48 | return function ($message) { |
||
49 | return $message; |
||
50 | }; |
||
51 | } |
||
52 | |||
53 | $middleware = $this->middlewares[$index]; |
||
54 | |||
55 | return function ($message) use ($middleware, $index) { |
||
56 | return $middleware->handle($message, $this->call($index + 1)); |
||
57 | }; |
||
58 | } |
||
59 | } |
||
60 |