Skip to content

Commit 90fca55

Browse files
committed
MC-41710: Build URL to paypal SDK
- Fix CR notes
1 parent 1e67450 commit 90fca55

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

app/code/Magento/Paypal/Block/PayLater/Banner.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ private function getPayPalSdkUrl()
8686
*/
8787
private function getStyleAttributesConfig()
8888
{
89-
return array_replace(
90-
['data-pp-style-logo-position' => 'left'],
91-
$this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_STYLES)
92-
);
89+
return $this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_STYLES);
9390
}
9491

9592
/**
@@ -101,7 +98,7 @@ private function isEnabled()
10198
{
10299
$enabled = $this->payLaterConfig->isEnabled($this->placement);
103100
return $enabled &&
104-
$this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_POSITION) ==
101+
$this->payLaterConfig->getSectionConfig($this->placement, PayLaterConfig::CONFIG_KEY_POSITION) ===
105102
$this->position;
106103
}
107104
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public function isEnabled(string $placement)
5959
*
6060
* @param string $section
6161
* @param string $key
62-
* @return array|mixed
62+
* @return array|string|int
6363
*/
64-
public function getSectionConfig($section, $key)
64+
public function getSectionConfig(string $section, string $key)
6565
{
6666
$configMock = [
6767
'product' => [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testGetConfig(
9494
string $intent,
9595
?string $disallowedFunding,
9696
bool $isPaypalGuestCheckoutEnabled,
97-
array $expected = []
97+
array $expected
9898
) {
9999
$this->localeResolverMock->method('getLocale')->willReturn($locale);
100100
$this->configMock->method('getValue')->willReturnMap(

0 commit comments

Comments
 (0)