Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
54 | 2 | private function call($index) |
|
55 | { |
||
56 | 2 | if (!isset($this->middlewares[$index])) { |
|
57 | return function ($message) { |
||
58 | 2 | return $message; |
|
59 | 2 | }; |
|
60 | } |
||
61 | |||
62 | 1 | $middleware = $this->middlewares[$index]; |
|
63 | |||
64 | 1 | return function ($message) use ($middleware, $index) { |
|
65 | 1 | return $middleware->handle($message, $this->call($index + 1)); |
|
66 | 1 | }; |
|
67 | } |
||
68 | } |
||
69 |