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