5
5
*/
6
6
namespace Magento \SalesRule \Model \Quote ;
7
7
8
- use Magento \SalesRule \Model \Rule \Action \Discount \DataFactory ;
9
8
use Magento \Framework \App \ObjectManager ;
10
9
use Magento \SalesRule \Api \Data \RuleDiscountInterfaceFactory ;
11
10
use Magento \SalesRule \Api \Data \DiscountDataInterfaceFactory ;
@@ -41,11 +40,6 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
41
40
*/
42
41
protected $ priceCurrency ;
43
42
44
- /**
45
- * @var \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory
46
- */
47
- private $ discountFactory ;
48
-
49
43
/**
50
44
* @var RuleDiscountInterfaceFactory
51
45
*/
@@ -61,7 +55,6 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
61
55
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
62
56
* @param \Magento\SalesRule\Model\Validator $validator
63
57
* @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
64
- * @param DataFactory|null $discountDataFactory
65
58
* @param RuleDiscountInterfaceFactory|null $discountInterfaceFactory
66
59
* @param DiscountDataInterfaceFactory|null $discountDataInterfaceFactory
67
60
*/
@@ -70,7 +63,6 @@ public function __construct(
70
63
\Magento \Store \Model \StoreManagerInterface $ storeManager ,
71
64
\Magento \SalesRule \Model \Validator $ validator ,
72
65
\Magento \Framework \Pricing \PriceCurrencyInterface $ priceCurrency ,
73
- DataFactory $ discountDataFactory = null ,
74
66
RuleDiscountInterfaceFactory $ discountInterfaceFactory = null ,
75
67
DiscountDataInterfaceFactory $ discountDataInterfaceFactory = null
76
68
) {
@@ -79,7 +71,6 @@ public function __construct(
79
71
$ this ->calculator = $ validator ;
80
72
$ this ->storeManager = $ storeManager ;
81
73
$ this ->priceCurrency = $ priceCurrency ;
82
- $ this ->discountFactory = $ discountDataFactory ?: ObjectManager::getInstance ()->get (DataFactory::class);
83
74
$ this ->discountInterfaceFactory = $ discountInterfaceFactory
84
75
?: ObjectManager::getInstance ()->get (RuleDiscountInterfaceFactory::class);
85
76
$ this ->discountDataInterfaceFactory = $ discountDataInterfaceFactory
0 commit comments