55 */
66namespace Magento \Quote \Model \QuoteRepository ;
77
8- use Magento \Framework \App \ObjectManager ;
98use Magento \Quote \Api \Data \CartInterface ;
109use Magento \Framework \Exception \InputException ;
11- use Magento \Framework \Exception \CouldNotSaveException ;
1210
1311class SaveHandler
1412{
@@ -32,11 +30,6 @@ class SaveHandler
3230 */
3331 private $ shippingAssignmentPersister ;
3432
35- /**
36- * @var \Magento\Framework\Message\PhraseFactory
37- */
38- private $ phraseFactory ;
39-
4033 /**
4134 * @param \Magento\Quote\Model\ResourceModel\Quote $quoteResource
4235 * @param \Magento\Quote\Model\Quote\Item\CartItemPersister $cartItemPersister
@@ -77,13 +70,6 @@ public function save(CartInterface $quote)
7770 }
7871 }
7972 }
80- $ errors = $ quote ->getErrors ();
81- if (!empty ($ errors )) {
82- $ phraseFactory = $ this ->getPhraseFactory ();
83- throw new CouldNotSaveException (
84- $ phraseFactory ->create ('Following errors occurred on save: %1 ' , $ errors )
85- );
86- }
8773
8874 // Billing Address processing
8975 $ billingAddress = $ quote ->getBillingAddress ();
@@ -97,18 +83,6 @@ public function save(CartInterface $quote)
9783 return $ quote ;
9884 }
9985
100- /**
101- * @deprecated
102- * @return \Magento\Framework\Message\PhraseFactory
103- */
104- private function getPhraseFactory ()
105- {
106- if (!is_object ($ this ->phraseFactory )) {
107- $ this ->phraseFactory = ObjectManager::getInstance ()->get (\Magento \Framework \Message \PhraseFactory::class);
108- }
109- return $ this ->phraseFactory ;
110- }
111-
11286 /**
11387 * @param \Magento\Quote\Model\Quote $quote
11488 * @return void
0 commit comments