Skip to content
Snippets Groups Projects
Commit 0023d118 authored by Cari Spruiell's avatar Cari Spruiell
Browse files

MAGETWO-36376: Magento\Quote\Api\GuestCartItemRepository

 - removed delete methods from interface and implementation
parent 60ccb72c
Branches
No related merge requests found
...@@ -30,15 +30,6 @@ interface GuestCartItemRepositoryInterface ...@@ -30,15 +30,6 @@ interface GuestCartItemRepositoryInterface
*/ */
public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem); public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem);
/**
* Delete cart item
*
* @param \Magento\Quote\Api\Data\CartItemInterface $cartItem
* @return void
* @throws \Magento\Framework\Exception\CouldNotSaveException
*/
public function delete(\Magento\Quote\Api\Data\CartItemInterface $cartItem);
/** /**
* Removes the specified item from the specified cart. * Removes the specified item from the specified cart.
* *
......
...@@ -75,15 +75,4 @@ class GuestCartItemRepository implements \Magento\Quote\Api\GuestCartItemReposit ...@@ -75,15 +75,4 @@ class GuestCartItemRepository implements \Magento\Quote\Api\GuestCartItemReposit
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
return $this->repository->deleteById($quoteIdMask->getId(), $itemId); return $this->repository->deleteById($quoteIdMask->getId(), $itemId);
} }
/**
* {@inheritdoc}
*/
public function delete(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
{
/** @var $quoteIdMask QuoteIdMask */
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartItem->getQuoteId(), 'masked_id');
$cartItem->setQuoteId($quoteIdMask->getId());
return $this->repository->delete($cartItem);
}
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment