| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public static function fromMiddlewareList(MiddlewareInterface ...$middlewareList): self |
||
| 16 | { |
||
| 17 | 2 | $deliveryChain = function (): void { |
|
| 18 | 2 | }; |
|
| 19 | |||
| 20 | 2 | while ($middleware = array_pop($middlewareList)) { |
|
| 21 | 2 | $deliveryChain = function (MessageInterface $message) use ($middleware, $deliveryChain): void { |
|
| 22 | 2 | $middleware->deliver($message, $deliveryChain); |
|
| 23 | 2 | }; |
|
| 24 | } |
||
| 25 | |||
| 26 | 2 | return new self($deliveryChain); |
|
| 27 | } |
||
| 42 |