5
5
*/
6
6
namespace Magento \Quote \Model \QuoteRepository ;
7
7
8
- use Magento \Framework \App \ObjectManager ;
9
8
use Magento \Quote \Api \Data \CartInterface ;
10
9
use Magento \Framework \Exception \InputException ;
11
- use Magento \Framework \Exception \CouldNotSaveException ;
12
10
13
11
class SaveHandler
14
12
{
@@ -32,11 +30,6 @@ class SaveHandler
32
30
*/
33
31
private $ shippingAssignmentPersister ;
34
32
35
- /**
36
- * @var \Magento\Framework\Message\PhraseFactory
37
- */
38
- private $ phraseFactory ;
39
-
40
33
/**
41
34
* @param \Magento\Quote\Model\ResourceModel\Quote $quoteResource
42
35
* @param \Magento\Quote\Model\Quote\Item\CartItemPersister $cartItemPersister
@@ -77,13 +70,6 @@ public function save(CartInterface $quote)
77
70
}
78
71
}
79
72
}
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
- }
87
73
88
74
// Billing Address processing
89
75
$ billingAddress = $ quote ->getBillingAddress ();
@@ -97,18 +83,6 @@ public function save(CartInterface $quote)
97
83
return $ quote ;
98
84
}
99
85
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
-
112
86
/**
113
87
* @param \Magento\Quote\Model\Quote $quote
114
88
* @return void
0 commit comments