protected function parseExistingCookie()
    {
        if (is_array($this->data)) {
            return;
        }

        $cookiesContent = filter_input_array(INPUT_COOKIE);

        if (empty($cookiesContent) || !array_key_exists($this->cookieName, $cookiesContent)) {
            $this->data = [];
            return;
        }

        $deserializedCookie = json_decode($cookiesContent[$this->cookieName], true);

        if (is_null($deserializedCookie)) {
            $this->data = [];
            return;
        }

        $this->data = $deserializedCookie;
    }