Skip to content

Commit 88264b7

Browse files
author
Stanislav Idolov
committed
MAGETWO-32775: Prepare pull request for Checkout related modules MSC
1 parent d9bf94c commit 88264b7

File tree

3 files changed

+79
-73
lines changed

3 files changed

+79
-73
lines changed

app/code/Magento/Directory/Model/Currency.php

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use Magento\Directory\Exception;
1515
use Magento\Directory\Model\Currency\Filter;
1616

17-
class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implements
18-
\Magento\Quote\Api\Data\CurrencyInterface
17+
class Currency extends \Magento\Framework\Model\AbstractModel
1918
{
2019
/**
2120
* CONFIG path constants
@@ -66,8 +65,6 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen
6665
/**
6766
* @param \Magento\Framework\Model\Context $context
6867
* @param \Magento\Framework\Registry $registry
69-
* @param \Magento\Framework\Api\MetadataServiceInterface $metadataService
70-
* @param \Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder
7168
* @param \Magento\Framework\Locale\FormatInterface $localeFormat
7269
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
7370
* @param \Magento\Directory\Helper\Data $directoryHelper
@@ -80,8 +77,6 @@ class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implemen
8077
public function __construct(
8178
\Magento\Framework\Model\Context $context,
8279
\Magento\Framework\Registry $registry,
83-
\Magento\Framework\Api\MetadataServiceInterface $metadataService,
84-
\Magento\Framework\Api\AttributeDataBuilder $customAttributeBuilder,
8580
\Magento\Framework\Locale\FormatInterface $localeFormat,
8681
\Magento\Store\Model\StoreManagerInterface $storeManager,
8782
\Magento\Directory\Helper\Data $directoryHelper,
@@ -94,8 +89,6 @@ public function __construct(
9489
parent::__construct(
9590
$context,
9691
$registry,
97-
$metadataService,
98-
$customAttributeBuilder,
9992
$resource,
10093
$resourceCollection,
10194
$data
@@ -392,68 +385,4 @@ public function saveRates($rates)
392385
$this->_getResource()->saveRates($rates);
393386
return $this;
394387
}
395-
396-
/**
397-
* {@inheritdoc}
398-
*/
399-
public function getGlobalCurrencyCode()
400-
{
401-
return $this->getData('global_currency_code');
402-
}
403-
404-
/**
405-
* {@inheritdoc}
406-
*/
407-
public function getBaseCurrencyCode()
408-
{
409-
return $this->getData('base_currency_code');
410-
}
411-
412-
/**
413-
* {@inheritdoc}
414-
*/
415-
public function getStoreCurrencyCode()
416-
{
417-
return $this->getData('store_currency_code');
418-
}
419-
420-
/**
421-
* {@inheritdoc}
422-
*/
423-
public function getQuoteCurrencyCode()
424-
{
425-
return $this->getData('quote_currency_code');
426-
}
427-
428-
/**
429-
* {@inheritdoc}
430-
*/
431-
public function getStoreToBaseRate()
432-
{
433-
return $this->getData('store_to_base_rate');
434-
}
435-
436-
/**
437-
* {@inheritdoc}
438-
*/
439-
public function getStoreToQuoteRate()
440-
{
441-
return $this->getData('store_to_quote_rate');
442-
}
443-
444-
/**
445-
* {@inheritdoc}
446-
*/
447-
public function getBaseToGlobalRate()
448-
{
449-
return $this->getData('base_to_global_rate');
450-
}
451-
452-
/**
453-
* {@inheritdoc}
454-
*/
455-
public function getBaseToQuoteRate()
456-
{
457-
return $this->getData('base_to_quote_rate');
458-
}
459388
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Quote\Model\Cart;
7+
8+
/**
9+
* @codeCoverageIgnore
10+
*/
11+
class Currency extends \Magento\Framework\Model\AbstractExtensibleModel implements
12+
\Magento\Quote\Api\Data\CurrencyInterface
13+
{
14+
/**
15+
* {@inheritdoc}
16+
*/
17+
public function getGlobalCurrencyCode()
18+
{
19+
return $this->getData('global_currency_code');
20+
}
21+
22+
/**
23+
* {@inheritdoc}
24+
*/
25+
public function getBaseCurrencyCode()
26+
{
27+
return $this->getData('base_currency_code');
28+
}
29+
30+
/**
31+
* {@inheritdoc}
32+
*/
33+
public function getStoreCurrencyCode()
34+
{
35+
return $this->getData('store_currency_code');
36+
}
37+
38+
/**
39+
* {@inheritdoc}
40+
*/
41+
public function getQuoteCurrencyCode()
42+
{
43+
return $this->getData('quote_currency_code');
44+
}
45+
46+
/**
47+
* {@inheritdoc}
48+
*/
49+
public function getStoreToBaseRate()
50+
{
51+
return $this->getData('store_to_base_rate');
52+
}
53+
54+
/**
55+
* {@inheritdoc}
56+
*/
57+
public function getStoreToQuoteRate()
58+
{
59+
return $this->getData('store_to_quote_rate');
60+
}
61+
62+
/**
63+
* {@inheritdoc}
64+
*/
65+
public function getBaseToGlobalRate()
66+
{
67+
return $this->getData('base_to_global_rate');
68+
}
69+
70+
/**
71+
* {@inheritdoc}
72+
*/
73+
public function getBaseToQuoteRate()
74+
{
75+
return $this->getData('base_to_quote_rate');
76+
}
77+
}

app/code/Magento/Quote/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
<preference for="Magento\Quote\Api\CartTotalRepositoryInterface" type="\Magento\Quote\Model\Cart\CartTotalRepository" />
3131
<preference for="Magento\Quote\Api\Data\TotalsInterface" type="\Magento\Quote\Model\Cart\Totals" />
3232
<preference for="Magento\Quote\Api\Data\TotalsItemInterface" type="\Magento\Quote\Model\Quote\Cart\Totals\Item" />
33-
<preference for="Magento\Quote\Api\Data\CurrencyInterface" type="\Magento\Directory\Model\Currency" />
33+
<preference for="Magento\Quote\Api\Data\CurrencyInterface" type="\Magento\Quote\Model\Cart\Currency" />
3434
</config>

0 commit comments

Comments
 (0)