private static function parseCookies(array $cookiesArray): RequestCookieCollectionInterface
    {
        $cookies = new RequestCookieCollection();

        foreach ($cookiesArray as $cookieName => $cookieValue) {
            $cookies->set(
                strval($cookieName),
                new RequestCookie(strval($cookieValue))
            );
        }

        return $cookies;
    }