protected function createCookieTab(ServerRequestInterface $serverRequest, ResponseInterface $response): array
    {
        if (! (\class_exists(RequestCookies::class) && \class_exists(ResponseCookies::class))) {
            return [];
        }

        $requestCookies = $responseCookies = [];

        /** @var Cookie $cookie */
        foreach (RequestCookies::fromRequest($serverRequest)->getAll() as $cookie) {
            $requestCookies[$cookie->getName()] = $cookie->getValue();
        }

        /** @var CookieContract $cookie */
        foreach (ResponseCookies::fromResponse($response)->getAll() as $cookie) {
            $responseCookies[$cookie->getName()] = $cookie->getValue();
        }

        return [
            'name'    => 'Cookies',
            'content' => $this->createTable(
                $requestCookies,
                [
                    'name'       => 'Request Cookies',
                    'empty_text' => 'No request cookies',
                ]
            ) . $this->createTable(
                $responseCookies,
                [
                    'name'       => 'Response Cookies',
                    'empty_text' => 'No response cookies',
                ]
            ),
        ];
    }