Skip to content

Commit c1bcce7

Browse files
author
Stanislav Idolov
authored
ENGCOM-3024: Replacing deprecated methods from Magento_Backend module. #17685
2 parents 5f809ad + 19af807 commit c1bcce7

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

app/code/Magento/Paypal/Model/AbstractConfig.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,26 @@ protected function _prepareValue($key, $value)
224224
*/
225225
public function shouldUseUnilateralPayments()
226226
{
227-
return $this->getValue('business_account') && !$this->isWppApiAvailabe();
227+
return $this->getValue('business_account') && !$this->isWppApiAvailable();
228228
}
229229

230230
/**
231231
* Check whether WPP API credentials are available for this method
232232
*
233+
* @deprecated
233234
* @return bool
234235
*/
235236
public function isWppApiAvailabe()
237+
{
238+
return $this->isWppApiAvailable();
239+
}
240+
241+
/**
242+
* Check whether WPP API credentials are available for this method
243+
*
244+
* @return bool
245+
*/
246+
public function isWppApiAvailable()
236247
{
237248
return $this->getValue('api_username')
238249
&& $this->getValue('api_password')

app/code/Magento/Paypal/Model/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ public function isMethodAvailable($methodCode = null)
677677
}
678678
break;
679679
case self::METHOD_BILLING_AGREEMENT:
680-
$result = $this->isWppApiAvailabe();
680+
$result = $this->isWppApiAvailable();
681681
break;
682682
}
683683
return $result;

app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ public function getValueDataProvider()
189189
*
190190
* @dataProvider isWppApiAvailabeDataProvider
191191
*/
192-
public function testIsWppApiAvailabe($returnMap, $expectedValue)
192+
public function testIsWppApiAvailable($returnMap, $expectedValue)
193193
{
194194
$this->config->setMethod('paypal_express');
195195
$this->scopeConfigMock->expects($this->any())
196196
->method('getValue')
197197
->willReturnMap($returnMap);
198198

199-
$this->assertEquals($expectedValue, $this->config->isWppApiAvailabe());
199+
$this->assertEquals($expectedValue, $this->config->isWppApiAvailable());
200200
}
201201

202202
/**

app/code/Magento/Wishlist/Block/AbstractBlock.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,21 @@ public function hasDescription($item)
231231
* Retrieve formated Date
232232
*
233233
* @param string $date
234+
* @deprecated
234235
* @return string
235236
*/
236237
public function getFormatedDate($date)
238+
{
239+
return $this->getFormattedDate($date);
240+
}
241+
242+
/**
243+
* Retrieve formatted Date
244+
*
245+
* @param string $date
246+
* @return string
247+
*/
248+
public function getFormattedDate($date)
237249
{
238250
return $this->formatDate($date, \IntlDateFormatter::MEDIUM);
239251
}

0 commit comments

Comments
 (0)