| Conditions | 2 | 
| Paths | 1 | 
| Total Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| 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 |         return $next($request)->then(function (ResponseInterface $response) use ($name) { | |
| 42 | 1 |             if (!$response->hasHeader(ReplayPlugin::HEADER_NAME)) { | |
| 43 | 1 | $this->recorder->record($name, $response); | |
| 44 | 1 | $response = $response->withAddedHeader(static::HEADER_NAME, $name); | |
| 45 | } | ||
| 46 | |||
| 47 | 1 | return $response; | |
| 48 | 1 | }); | |
| 49 | } | ||
| 50 | } | ||
| 51 |