src/Storage/Adapter/Cookie.php
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;
    }
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;
    }
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 ; }
Parses any previous cookie and stores it internally
Parses any previous cookie and stores it internally