Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Nov 12, 2024
1 parent 84d9f10 commit 1579ab1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/PayPal/Order/Cache/PayPalOrderCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class PayPalOrderCache extends ChainCache

/**
* @param string $key
* @param $value
* @param mixed $value
* @param int $ttl Time To Live in seconds. Defines how long the value will be stored in the cache.
*
* @return bool
Expand Down
20 changes: 10 additions & 10 deletions src/PayPal/Order/PaypalOrderDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,18 @@ public function isTokenSaved()

public function getPaymentTokenIdentifier()
{
$fundingSource = $this->payPalOrder->getFundingSource();

if ($this->payPalOrder && isset($this->payPalOrder->getPaymentSource()[$fundingSource])) {
$paymentSource = $this->payPalOrder->getPaymentSource()[$fundingSource];

if ($fundingSource === 'card') {
return (isset($paymentSource['brand']) ? $paymentSource['brand'] : '') . (isset($paymentSource['last_digits']) ? ' *' . $paymentSource['last_digits'] : '');
} else {
return isset($paymentSource['email_address']) ? $paymentSource['email_address'] : '';
if ($this->payPalOrder) {
$fundingSource = $this->payPalOrder->getFundingSource();
if (isset($this->payPalOrder->getPaymentSource()[$fundingSource])) {
$paymentSource = $this->payPalOrder->getPaymentSource()[$fundingSource];

if ($fundingSource === 'card') {
return (isset($paymentSource['brand']) ? $paymentSource['brand'] : '') . (isset($paymentSource['last_digits']) ? ' *' . $paymentSource['last_digits'] : '');
} else {
return isset($paymentSource['email_address']) ? $paymentSource['email_address'] : '';
}
}
}

return '';
}
}

0 comments on commit 1579ab1

Please sign in to comment.