CodeExplorer lineItemNotRemovable example
public function remove(string
$key): void
{ $item =
$this->
get($key);
if (!
$item) { throw CartException::
lineItemNotFound($key);
} if (!
$item->
isRemovable()) { throw CartException::
lineItemNotRemovable($key);
} $this->lineItems->
remove($key);
} public function getTransactions(): TransactionCollection
{ return $this->transactions;
} public function setTransactions(TransactionCollection
$transactions): self
{