public function hasPayloadValue(string
$key): bool
{ return isset($this->payload
[$key]);
} /**
* @throws CartException
*/
public function removePayloadValue(string
$key): void
{ if (!
$this->
hasPayloadValue($key)) { throw CartException::
payloadKeyNotFound($key,
$this->
getId());
} unset($this->payload
[$key]);
unset($this->payloadProtection
[$key]);
} /**
* @deprecated tag:v6.6.0 - reason:new-optional-parameter - Parameter $protected will be added in v6.6.0
*
* @param mixed|null $value
*
* @throws CartException
*/