| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class CookieSendMiddleware implements MiddlewareInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var CookieManagerInterface |
||
| 16 | */ |
||
| 17 | private CookieManagerInterface $cookies; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private bool $removeResponseCookies; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param CookieManagerInterface $cookies object with cookies to set in response. |
||
| 26 | * @param bool $removeResponseCookies whether to remove previously set cookies from the response. |
||
| 27 | */ |
||
| 28 | 6 | public function __construct(CookieManagerInterface $cookies, bool $removeResponseCookies = true) |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param ServerRequestInterface $request |
||
| 36 | * @param RequestHandlerInterface $handler |
||
| 37 | * @return ResponseInterface |
||
| 38 | */ |
||
| 39 | 6 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
| 45 |