public function restore()
    {
        $state = $this->store->get($this->id);

        if ($state == '') {
            return;
        }

        $data = @unserialize($state); // suppress unserializable error

        $this->restoreCheckType($data);
        $this->restoreCheckContents($data);
        $this->restoreCheckContentsType($data);

        $this->id = $data['id'];
        $this->items = [];

        foreach ($data['items'] as $itemArr) {
            $this->items[] = new CartItem($itemArr);
        }
    }