@@ -319,14 +319,9 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
319
319
protected $ customerRepository ;
320
320
321
321
/**
322
- * @var \Magento\Quote\Api\Data\TotalsDataBuilder
322
+ * @var Cart\CurrencyFactory
323
323
*/
324
- protected $ totalsBuilder ;
325
-
326
- /**
327
- * @var \Magento\Quote\Api\Data\CurrencyDataBuilder
328
- */
329
- protected $ currencyBuilder ;
324
+ protected $ currencyFactory ;
330
325
331
326
/**
332
327
* @param \Magento\Framework\Model\Context $context
@@ -359,8 +354,7 @@ class Quote extends AbstractExtensibleModel implements \Magento\Quote\Api\Data\C
359
354
* @param \Magento\Customer\Api\Data\CustomerDataBuilder $customerBuilder
360
355
* @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
361
356
* @param \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter
362
- * @param \Magento\Quote\Api\Data\TotalsDataBuilder $totalsBuilder
363
- * @param \Magento\Quote\Api\Data\CurrencyDataBuilder $currencyBuilder
357
+ * @param Cart\CurrencyFactory $currencyFactory
364
358
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
365
359
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
366
360
* @param array $data
@@ -396,8 +390,7 @@ public function __construct(
396
390
\Magento \Customer \Api \Data \CustomerDataBuilder $ customerBuilder ,
397
391
\Magento \Customer \Api \CustomerRepositoryInterface $ customerRepository ,
398
392
\Magento \Framework \Api \ExtensibleDataObjectConverter $ extensibleDataObjectConverter ,
399
- \Magento \Quote \Api \Data \TotalsDataBuilder $ totalsBuilder ,
400
- \Magento \Quote \Api \Data \CurrencyDataBuilder $ currencyBuilder ,
393
+ \Magento \Quote \Model \Cart \CurrencyFactory $ currencyFactory ,
401
394
\Magento \Framework \Model \Resource \AbstractResource $ resource = null ,
402
395
\Magento \Framework \Data \Collection \Db $ resourceCollection = null ,
403
396
array $ data = []
@@ -428,8 +421,7 @@ public function __construct(
428
421
$ this ->customerBuilder = $ customerBuilder ;
429
422
$ this ->customerRepository = $ customerRepository ;
430
423
$ this ->extensibleDataObjectConverter = $ extensibleDataObjectConverter ;
431
- $ this ->totalsBuilder = $ totalsBuilder ;
432
- $ this ->currencyBuilder = $ currencyBuilder ;
424
+ $ this ->currencyFactory = $ currencyFactory ;
433
425
parent ::__construct (
434
426
$ context ,
435
427
$ registry ,
@@ -452,13 +444,15 @@ protected function _construct()
452
444
}
453
445
454
446
/**
447
+ * @codeCoverageIgnoreStart
448
+ *
455
449
* {@inheritdoc}
456
450
*/
457
451
public function getCurrency ()
458
452
{
459
453
$ currency = $ this ->getData ('currency ' );
460
454
if (!$ currency ) {
461
- $ this ->currencyBuilder
455
+ $ currency = $ this ->currencyFactory -> create ()
462
456
->setGlobalCurrencyCode ($ this ->getGlobalCurrencyCode ())
463
457
->setBaseCurrencyCode ($ this ->getBaseCurrencyCode ())
464
458
->setStoreCurrencyCode ($ this ->getStoreCurrencyCode ())
@@ -467,14 +461,11 @@ public function getCurrency()
467
461
->setStoreToQuoteRate ($ this ->getStoreToQuoteRate ())
468
462
->setBaseToGlobalRate ($ this ->getBaseToGlobalRate ())
469
463
->setBaseToQuoteRate ($ this ->getBaseToQuoteRate ());
470
- $ currency = $ this ->currencyBuilder ->create ();
471
464
}
472
465
return $ currency ;
473
466
}
474
467
475
468
/**
476
- * @codeCoverageIgnoreStart
477
- *
478
469
* {@inheritdoc}
479
470
*/
480
471
public function getItems ()
0 commit comments