@@ 68-81 (lines=14) @@ | ||
65 | * |
|
66 | * @return callable |
|
67 | */ |
|
68 | private function call($index) |
|
69 | { |
|
70 | $middleware = $this->lazyLoad($index); |
|
71 | ||
72 | if (!($middleware instanceof MiddlewareHandler)) { |
|
73 | return function ($message) { |
|
74 | return $message; |
|
75 | }; |
|
76 | } |
|
77 | ||
78 | return function ($message) use ($middleware, $index) { |
|
79 | return $middleware->handle($message, $this->call($index + 1)); |
|
80 | }; |
|
81 | } |
|
82 | ||
83 | /** |
|
84 | * @param $index |
@@ 59-72 (lines=14) @@ | ||
56 | * |
|
57 | * @return callable |
|
58 | */ |
|
59 | private function call($index) |
|
60 | { |
|
61 | $middleware = $this->lazyLoad($index); |
|
62 | ||
63 | if (!($middleware instanceof MiddlewareHandler)) { |
|
64 | return function ($message) { |
|
65 | return $message; |
|
66 | }; |
|
67 | } |
|
68 | ||
69 | return function ($message) use ($middleware, $index) { |
|
70 | return $middleware->handle($message, $this->call($index + 1)); |
|
71 | }; |
|
72 | } |
|
73 | ||
74 | /** |
|
75 | * @param $index |