Skip to content

Commit 6369152

Browse files
committed
add null
1 parent 4944caf commit 6369152

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Support/Caching/LaravelCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function get(string $key, mixed $default = null): mixed
2020
return $this->repository->get($key, $default);
2121
}
2222

23-
public function set(string $key, mixed $value, int|DateInterval $ttl = null): bool
23+
public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
2424
{
2525
return $this->repository->put($key, $value, $ttl);
2626
}
@@ -44,7 +44,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable
4444
return $results;
4545
}
4646

47-
public function setMultiple(iterable $values, int|DateInterval $ttl = null): bool
47+
public function setMultiple(iterable $values, int|DateInterval|null $ttl = null): bool
4848
{
4949
foreach ($values as $key => $value) {
5050
$this->set($key, $value, $ttl);

src/Support/Caching/MemoryCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function get(string $key, mixed $default = null): mixed
1414
return $this->store[$key] ?? $default;
1515
}
1616

17-
public function set(string $key, mixed $value, int|DateInterval $ttl = null): bool
17+
public function set(string $key, mixed $value, int|DateInterval|null $ttl = null): bool
1818
{
1919
$this->store[$key] = $value;
2020
return true;
@@ -41,7 +41,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable
4141
return $result;
4242
}
4343

44-
public function setMultiple(iterable $values, int|DateInterval $ttl = null): bool
44+
public function setMultiple(iterable $values, int|DateInterval|null $ttl = null): bool
4545
{
4646
foreach ($values as $key => $value) {
4747
$this->set($key, $value, $ttl);

0 commit comments

Comments
 (0)