public function getCookies(bool $includeDeletedCookies = false) : array
    {
        $cookies = [];

        foreach ($this->cookies as $domain => $cookiesByDomain) {
            foreach ($cookiesByDomain as $path => $cookiesByPath) {
                /**
                 * @var string $name
                 * @var Cookie $cookie
                 */
                foreach ($cookiesByPath as $name => $cookie) {
                    // Only include active cookies
                    if ($includeDeletedCookies || $cookie->getExpiration() >= time()) {
                        $cookies[] = $cookie;
                    }
                }
            }
        }

        return $cookies;
    }