-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
namespace PrestaShop\Module\PrestashopCheckout\PayPal\Order\Cache; | ||
|
||
use PsCheckoutCart; | ||
use Psr\SimpleCache\InvalidArgumentException; | ||
use Symfony\Component\Cache\Simple\ChainCache; | ||
|
||
class PayPalOrderCache extends ChainCache | ||
|
@@ -36,6 +37,15 @@ class PayPalOrderCache extends ChainCache | |
PsCheckoutCart::STATUS_COMPLETED => 3600, | ||
]; | ||
|
||
/** | ||
* @param string $key | ||
* @param $value | ||
* @param int $ttl Time To Live in seconds. Defines how long the value will be stored in the cache. | ||
* | ||
* @return bool | ||
* | ||
* @throws InvalidArgumentException | ||
*/ | ||
public function set($key, $value, $ttl = null) | ||
Check failure on line 49 in src/PayPal/Order/Cache/PayPalOrderCache.php GitHub Actions / PHPStan (8.0.0)
Check failure on line 49 in src/PayPal/Order/Cache/PayPalOrderCache.php GitHub Actions / PHPStan (8.0.0)
Check failure on line 49 in src/PayPal/Order/Cache/PayPalOrderCache.php GitHub Actions / PHPStan (latest)
Check failure on line 49 in src/PayPal/Order/Cache/PayPalOrderCache.php GitHub Actions / PHPStan (latest)
|
||
{ | ||
if (!$ttl && isset($value['status']) && isset(self::CACHE_TTL[$value['status']])) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters