10
10
use Magento \Quote \Api \CartManagementInterface ;
11
11
use Magento \Quote \Model \QuoteIdMask ;
12
12
use Magento \Quote \Model \QuoteIdMaskFactory ;
13
- use Magento \Quote \Model \QuoteManagement ;
14
- use Magento \Quote \Model \QuoteRepository ;
15
13
16
14
/**
17
15
* Cart Management class for guest carts.
@@ -25,11 +23,6 @@ class GuestCartManagement implements GuestCartManagementInterface
25
23
*/
26
24
protected $ quoteManagement ;
27
25
28
- /**
29
- * @var QuoteRepository
30
- */
31
- protected $ quoteRepository ;
32
-
33
26
/**
34
27
* @var QuoteIdMaskFactory
35
28
*/
@@ -39,17 +32,14 @@ class GuestCartManagement implements GuestCartManagementInterface
39
32
* Initialize dependencies.
40
33
*
41
34
* @param CartManagementInterface $quoteManagement
42
- * @param QuoteRepository $quoteRepository
43
35
* @param QuoteIdMaskFactory $quoteIdMaskFactory
44
36
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
45
37
*/
46
38
public function __construct (
47
39
CartManagementInterface $ quoteManagement ,
48
- QuoteRepository $ quoteRepository ,
49
40
QuoteIdMaskFactory $ quoteIdMaskFactory
50
41
) {
51
42
$ this ->quoteManagement = $ quoteManagement ;
52
- $ this ->quoteRepository = $ quoteRepository ;
53
43
$ this ->quoteIdMaskFactory = $ quoteIdMaskFactory ;
54
44
}
55
45
@@ -84,16 +74,4 @@ public function placeOrder($cartId)
84
74
$ quoteIdMask = $ this ->quoteIdMaskFactory ->create ()->load ($ cartId , 'masked_id ' );
85
75
return $ this ->quoteManagement ->placeOrder ($ quoteIdMask ->getId ());
86
76
}
87
-
88
- /**
89
- * {@inheritdoc}
90
- */
91
- public function getCartForCustomer ($ customerId )
92
- {
93
- $ cart = $ this ->quoteRepository ->getActiveForCustomer ($ customerId );
94
- /** @var $quoteIdMask QuoteIdMask */
95
- $ quoteIdMask = $ this ->quoteIdMaskFactory ->create ()->load ($ cart ->getId (), 'masked_id ' );
96
- $ cart ->setId ($ quoteIdMask ->getId ());
97
- return $ cart ;
98
- }
99
77
}
0 commit comments