@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * @throws \Psr\SimpleCache\InvalidArgumentException |
| 83 | 83 | * MUST be thrown if the $key string is not a legal value. |
| 84 | 84 | */ |
| 85 | - public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool |
|
| 85 | + public function set(string $key, mixed $value, DateInterval | int | null $ttl = null): bool |
|
| 86 | 86 | { |
| 87 | 87 | return $this->memcached->set($key, $value, $this->handleTtl($ttl)); |
| 88 | 88 | } |
@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return int Ttl in seconds. |
| 98 | 98 | */ |
| 99 | - private function handleTtl(DateInterval|int|null $ttl): int |
|
| 99 | + private function handleTtl(DateInterval | int | null $ttl): int |
|
| 100 | 100 | { |
| 101 | - if ($ttl == null){ |
|
| 101 | + if ($ttl == null) { |
|
| 102 | 102 | return 0; |
| 103 | 103 | } |
| 104 | 104 | if (is_int($ttl)) { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @throws \Psr\SimpleCache\InvalidArgumentException |
| 46 | 46 | * MUST be thrown if the $key string is not a legal value. |
| 47 | 47 | */ |
| 48 | - abstract public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool; |
|
| 48 | + abstract public function set(string $key, mixed $value, DateInterval | int | null $ttl = null): bool; |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * Determines whether an item is present in the cache. |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * MUST be thrown if $values is neither an array nor a Traversable, |
| 114 | 114 | * or if any of the $values are not a legal value. |
| 115 | 115 | */ |
| 116 | - public function setMultiple(iterable $values, null|int|DateInterval $ttl = null): bool |
|
| 116 | + public function setMultiple(iterable $values, null | int | DateInterval $ttl = null): bool |
|
| 117 | 117 | { |
| 118 | 118 | foreach ($values as $key => $value) { |
| 119 | 119 | $this->set($key, $value, $ttl); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @throws \Psr\SimpleCache\InvalidArgumentException |
| 115 | 115 | * MUST be thrown if the $key string is not a legal value. |
| 116 | 116 | */ |
| 117 | - public function set(string $key, mixed $value, DateInterval|int|null $ttl = null): bool |
|
| 117 | + public function set(string $key, mixed $value, DateInterval | int | null $ttl = null): bool |
|
| 118 | 118 | { |
| 119 | 119 | $vTtl = $this->handleTtl($ttl); |
| 120 | 120 | |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @return int Ttl in seconds. |
| 147 | 147 | */ |
| 148 | - private function handleTtl(DateInterval|int|null $ttl): int |
|
| 148 | + private function handleTtl(DateInterval | int | null $ttl): int |
|
| 149 | 149 | { |
| 150 | - if ($ttl == null){ |
|
| 150 | + if ($ttl == null) { |
|
| 151 | 151 | return 0; |
| 152 | 152 | } |
| 153 | 153 | if (is_int($ttl)) { |