55 */
66namespace Magento \SalesRule \Model \Quote ;
77
8- use Magento \SalesRule \Model \Rule \Action \Discount \DataFactory ;
98use Magento \Framework \App \ObjectManager ;
109use Magento \SalesRule \Api \Data \RuleDiscountInterfaceFactory ;
1110use Magento \SalesRule \Api \Data \DiscountDataInterfaceFactory ;
@@ -41,11 +40,6 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
4140 */
4241 protected $ priceCurrency ;
4342
44- /**
45- * @var \Magento\SalesRule\Model\Rule\Action\Discount\DataFactory
46- */
47- private $ discountFactory ;
48-
4943 /**
5044 * @var RuleDiscountInterfaceFactory
5145 */
@@ -61,7 +55,6 @@ class Discount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
6155 * @param \Magento\Store\Model\StoreManagerInterface $storeManager
6256 * @param \Magento\SalesRule\Model\Validator $validator
6357 * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
64- * @param DataFactory|null $discountDataFactory
6558 * @param RuleDiscountInterfaceFactory|null $discountInterfaceFactory
6659 * @param DiscountDataInterfaceFactory|null $discountDataInterfaceFactory
6760 */
@@ -70,7 +63,6 @@ public function __construct(
7063 \Magento \Store \Model \StoreManagerInterface $ storeManager ,
7164 \Magento \SalesRule \Model \Validator $ validator ,
7265 \Magento \Framework \Pricing \PriceCurrencyInterface $ priceCurrency ,
73- DataFactory $ discountDataFactory = null ,
7466 RuleDiscountInterfaceFactory $ discountInterfaceFactory = null ,
7567 DiscountDataInterfaceFactory $ discountDataInterfaceFactory = null
7668 ) {
@@ -79,7 +71,6 @@ public function __construct(
7971 $ this ->calculator = $ validator ;
8072 $ this ->storeManager = $ storeManager ;
8173 $ this ->priceCurrency = $ priceCurrency ;
82- $ this ->discountFactory = $ discountDataFactory ?: ObjectManager::getInstance ()->get (DataFactory::class);
8374 $ this ->discountInterfaceFactory = $ discountInterfaceFactory
8475 ?: ObjectManager::getInstance ()->get (RuleDiscountInterfaceFactory::class);
8576 $ this ->discountDataInterfaceFactory = $ discountDataInterfaceFactory
0 commit comments