Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | 1 | public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise |
|
38 | { |
||
39 | 1 | $name = $this->namingStrategy->name($request); |
|
40 | |||
41 | 1 | if ($response = $this->player->replay($name)) { |
|
42 | 1 | return new FulfilledPromise($response->withAddedHeader(static::HEADER_NAME, $name)); |
|
43 | } |
||
44 | |||
45 | 1 | return $next($request); |
|
46 | } |
||
47 | } |
||
48 |