Skip to content

Commit e6e90c8

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

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ public function getTotalAmounts($items, $store = null)
744744
* @param int|null $storeId
745745
* @return bool
746746
*/
747-
public function getDisplayIncl($storeId = null)
747+
public function isDisplayIncl($storeId = null)
748748
{
749749
return $this->typeOfDisplay(
750750
WeeeDisplayConfig::DISPLAY_INCL,
@@ -759,7 +759,7 @@ public function getDisplayIncl($storeId = null)
759759
* @param int|null $storeId
760760
* @return bool
761761
*/
762-
public function getDisplayInclDesc($storeId = null)
762+
public function isDisplayInclDesc($storeId = null)
763763
{
764764
return $this->typeOfDisplay(
765765
WeeeDisplayConfig::DISPLAY_INCL_DESCR,
@@ -774,7 +774,7 @@ public function getDisplayInclDesc($storeId = null)
774774
* @param int|null $storeId
775775
* @return bool
776776
*/
777-
public function getDisplayExlDescIncl($storeId = null)
777+
public function isDisplayExlDescIncl($storeId = null)
778778
{
779779
return $this->typeOfDisplay(
780780
WeeeDisplayConfig::DISPLAY_EXCL_DESCR_INCL,
@@ -789,7 +789,7 @@ public function getDisplayExlDescIncl($storeId = null)
789789
* @param int|null $storeId
790790
* @return bool
791791
*/
792-
public function getDisplayExcl($storeId = null)
792+
public function isDisplayExcl($storeId = null)
793793
{
794794
return $this->typeOfDisplay(
795795
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->getDisplayExcl($storeId) ||
146-
$this->weeeData->getDisplayExlDescIncl($storeId) ||
145+
if ($this->weeeData->isDisplayExcl($storeId) ||
146+
$this->weeeData->isDisplayExlDescIncl($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->getDisplayIncl($product->getStoreId()) &&
64-
!$this->weeeData->getDisplayExcl($product->getStoreId())
63+
!$this->weeeData->isDisplayIncl($product->getStoreId()) &&
64+
!$this->weeeData->isDisplayExcl($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->getDisplayExlDescIncl($product->getStoreId())) {
90+
if ($this->weeeData->isDisplayExlDescIncl($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->getDisplayExcl($storeId) ||
114-
$this->weeeData->getDisplayExlDescIncl($storeId) ||
113+
if ($this->weeeData->isDisplayExcl($storeId) ||
114+
$this->weeeData->isDisplayExlDescIncl($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('getDisplayExlDescIncl')
50+
->method('isDisplayExlDescIncl')
5151
->will($this->returnValue($weeeDisplayExclDescIncl));
5252
$weeeHelper->expects($this->any())
5353
->method('getWeeeAttributesForBundle')

0 commit comments

Comments
 (0)