9
9
10
10
use Exception ;
11
11
use Magento \Catalog \Api \ProductRepositoryInterface ;
12
- use Magento \Framework \Model \Context ;
13
- use Magento \Framework \Event \ManagerInterface ;
14
12
use Magento \Framework \Exception \NoSuchEntityException ;
15
13
use Magento \Framework \GraphQl \Exception \GraphQlInputException ;
16
14
use Magento \Framework \GraphQl \Exception \GraphQlNoSuchEntityException ;
17
15
use Magento \Quote \Model \Quote ;
18
- use Magento \Quote \Model \Quote \Item \Processor ;
19
16
use Magento \QuoteGraphQl \Model \Cart \BuyRequest \BuyRequestBuilder ;
20
- use Magento \Framework \App \CacheInterface ;
21
17
22
18
/**
23
19
* Add simple product to cart mutation
@@ -34,33 +30,16 @@ class AddSimpleProductToCart
34
30
*/
35
31
private $ buyRequestBuilder ;
36
32
37
- /**
38
- * @var Processor
39
- */
40
- private $ itemProcessor ;
41
-
42
- /**
43
- * @var ManagerInterface
44
- */
45
- private $ eventManager ;
46
-
47
33
/**
48
34
* @param ProductRepositoryInterface $productRepository
49
35
* @param BuyRequestBuilder $buyRequestBuilder
50
- * @param Processor $itemProcessor
51
- * @param Context $context
52
36
*/
53
37
public function __construct (
54
38
ProductRepositoryInterface $ productRepository ,
55
- BuyRequestBuilder $ buyRequestBuilder ,
56
- Processor $ itemProcessor ,
57
- Context $ context ,
58
- CacheInterface $ cache
39
+ BuyRequestBuilder $ buyRequestBuilder
59
40
) {
60
41
$ this ->productRepository = $ productRepository ;
61
42
$ this ->buyRequestBuilder = $ buyRequestBuilder ;
62
- $ this ->itemProcessor = $ itemProcessor ;
63
- $ this ->eventManager = $ context ->getEventDispatcher ();
64
43
}
65
44
66
45
/**
0 commit comments