private function restoreCheckType($data) { if ($data === false) { throw new CartRestoreException('Saved cart state is unserializable.'); } if (!is_array($data)) { throw new CartRestoreException('Unserialized data is not an array.'); } }