Skip to content

Commit 52abb19

Browse files
author
Robert He
committed
MAGETWO-43908: Rename misspelled functions in Weee helper
-- rename some Weee functions
1 parent 54b85e9 commit 52abb19

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

app/code/Magento/Weee/Helper/Data.php

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,12 +739,12 @@ public function getTotalAmounts($items, $store = null)
739739
}
740740

741741
/**
742-
* get FPT DISPLAY_INCL setting
742+
* Get FPT DISPLAY_INCL setting
743743
*
744744
* @param int|null $storeId
745745
* @return bool
746746
*/
747-
public function geDisplayIncl($storeId = null)
747+
public function getDisplayIncl($storeId = null)
748748
{
749749
return $this->typeOfDisplay(
750750
WeeeDisplayConfig::DISPLAY_INCL,
@@ -754,12 +754,27 @@ public function geDisplayIncl($storeId = null)
754754
}
755755

756756
/**
757-
* get FPT DISPLAY_EXCL_DESCR_INCL setting
757+
* Get FPT DISPLAY_INCL_DESCR setting
758758
*
759759
* @param int|null $storeId
760760
* @return bool
761761
*/
762-
public function geDisplayExlDescIncl($storeId = null)
762+
public function getDisplayInclDesc($storeId = null)
763+
{
764+
return $this->typeOfDisplay(
765+
WeeeDisplayConfig::DISPLAY_INCL_DESCR,
766+
\Magento\Framework\Pricing\Render::ZONE_ITEM_VIEW,
767+
$storeId
768+
);
769+
}
770+
771+
/**
772+
* Get FPT DISPLAY_EXCL_DESCR_INCL setting
773+
*
774+
* @param int|null $storeId
775+
* @return bool
776+
*/
777+
public function getDisplayExlDescIncl($storeId = null)
763778
{
764779
return $this->typeOfDisplay(
765780
WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL,
@@ -769,12 +784,12 @@ public function geDisplayExlDescIncl($storeId = null)
769784
}
770785

771786
/**
772-
* get FPT DISPLAY_EXCL setting
787+
* Get FPT DISPLAY_EXCL setting
773788
*
774789
* @param int|null $storeId
775790
* @return bool
776791
*/
777-
public function geDisplayExcl($storeId = null)
792+
public function getDisplayExcl($storeId = null)
778793
{
779794
return $this->typeOfDisplay(
780795
WeeeDisplayConfig::DISPLAY_EXCL,

app/code/Magento/Weee/Observer/GetPriceConfigurationObserver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ private function insertWeeePrice($holder, $key, $weeeAttributes)
142142
protected function getWhichCalcPriceToUse($storeId = null)
143143
{
144144
$calcPrice = 'finalPrice';
145-
if ($this->weeeData->geDisplayExcl($storeId) ||
146-
$this->weeeData->geDisplayExlDescIncl($storeId) ||
145+
if ($this->weeeData->getDisplayExcl($storeId) ||
146+
$this->weeeData->getDisplayExlDescIncl($storeId) ||
147147
($this->taxData->priceIncludesTax() && $this->taxData->displayPriceExcludingTax())
148148
) {
149149
$calcPrice = 'basePrice';

app/code/Magento/Weee/Observer/UpdateProductOptionsObserver.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
6060
}
6161

6262
if ($this->weeeData->isEnabled() &&
63-
!$this->weeeData->geDisplayIncl($product->getStoreId()) &&
64-
!$this->weeeData->geDisplayExcl($product->getStoreId())
63+
!$this->weeeData->getDisplayIncl($product->getStoreId()) &&
64+
!$this->weeeData->getDisplayExcl($product->getStoreId())
6565
) {
6666
// only do processing on bundle product
6767
if ($product->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
@@ -87,7 +87,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
8787
}
8888
}
8989

90-
if ($this->weeeData->geDisplayExlDescIncl($product->getStoreId())) {
90+
if ($this->weeeData->getDisplayExlDescIncl($product->getStoreId())) {
9191
$options['optionTemplate'] .= sprintf(
9292
' <%% if (data.weeePrice) { %%>'
9393
. '<%%- data.weeePrice.formatted %%>'
@@ -110,8 +110,8 @@ public function execute(\Magento\Framework\Event\Observer $observer)
110110
protected function getWhichCalcPriceToUse($storeId = null)
111111
{
112112
$calcPrice = 'finalPrice';
113-
if ($this->weeeData->geDisplayExcl($storeId) ||
114-
$this->weeeData->geDisplayExlDescIncl($storeId) ||
113+
if ($this->weeeData->getDisplayExcl($storeId) ||
114+
$this->weeeData->getDisplayExlDescIncl($storeId) ||
115115
($this->taxData->priceIncludesTax() && $this->taxData->displayPriceExcludingTax())
116116
) {
117117
$calcPrice = 'basePrice';

app/code/Magento/Weee/Test/Unit/Observer/UpdateProductOptionsObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testUpdateProductOptions($testArray, $weeeEnabled, $weeeDisplayE
4747
->method('isEnabled')
4848
->will($this->returnValue($weeeEnabled));
4949
$weeeHelper->expects($this->any())
50-
->method('geDisplayExlDescIncl')
50+
->method('getDisplayExlDescIncl')
5151
->will($this->returnValue($weeeDisplayExclDescIncl));
5252
$weeeHelper->expects($this->any())
5353
->method('getWeeeAttributesForBundle')

0 commit comments

Comments
 (0)