Skip to content

Commit 0611b80

Browse files
committed
fix: implicitly nullable parameter type updated with explicit type
1 parent 33cfd23 commit 0611b80

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

CacheException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function forCreatingDirectory(string $directory): static
5050
]);
5151
}
5252

53-
public static function generic(string $message, Throwable $previous = null): static
53+
public static function generic(string $message, ?Throwable $previous = null): static
5454
{
5555
return new static(Cache::E_PHP_EXCEPTION, [
5656
':message' => $message

Client/FileClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class FileClient implements Cache
4242
private string $dir = '';
4343
private LoggerInterface $logger;
4444

45-
public function __construct(LoggerInterface $logger, string $dir, int $ttl = null)
45+
public function __construct(LoggerInterface $logger, string $dir, null|int $ttl = null)
4646
{
4747
$this->ttl = $ttl;
4848
$this->logger = $logger;

Client/MemcachedClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class MemcachedClient implements Cache
2323
{
2424
use ClientTrait, MultiplesTrait;
2525

26-
public function __construct(Memcached $client, int $ttl = null)
26+
public function __construct(Memcached $client, null|int $ttl = null)
2727
{
2828
$this->ttl = $ttl;
2929
$this->client = $client;

Client/MemoryClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class MemoryClient implements Cache
2525
private array $storage = [];
2626
private array $expiration = [];
2727

28-
public function __construct(int $ttl = null)
28+
public function __construct(null|int $ttl = null)
2929
{
3030
$this->ttl = $ttl;
3131
}

Client/PredisClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class PredisClient implements Cache
2525

2626
private Serializer $serializer;
2727

28-
public function __construct(\Predis\Client $client, Serializer $serializer, int $ttl = null)
28+
public function __construct(\Predis\Client $client, Serializer $serializer, null|int $ttl = null)
2929
{
3030
$this->client = $client;
3131
$this->serializer = $serializer;

Client/PredisJsonClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class PredisJsonClient implements Cache
3434
private int $options;
3535
private Serializer $serializer;
3636

37-
public function __construct(\Predis\Client $client, Serializer $serializer, int $options, int $ttl = null)
37+
public function __construct(\Predis\Client $client, Serializer $serializer, int $options, null|int $ttl = null)
3838
{
3939
$this->suffix = '__' . $serializer->type() . '__';
4040
$this->serializer = $serializer;

Client/RedisClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class RedisClient implements Cache
2424

2525
private Serializer $serializer;
2626

27-
public function __construct(\Redis $client, Serializer $serializer, int $ttl = null)
27+
public function __construct(\Redis $client, Serializer $serializer, null|int $ttl = null)
2828
{
2929
$this->client = $client;
3030
$this->serializer = $serializer;

Client/RedisJsonClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class RedisJsonClient implements Cache
3535
private int $options;
3636
private Serializer $serializer;
3737

38-
public function __construct(\Redis $client, Serializer $serializer, int $options, int $ttl = null)
38+
public function __construct(\Redis $client, Serializer $serializer, int $options, null|int $ttl = null)
3939
{
4040
$this->suffix = '__' . $serializer->type() . '__';
4141
$this->serializer = $serializer;

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.1.1

0 commit comments

Comments
 (0)