Skip to content

Commit

Permalink
Merge pull request #123 from samsonasik/update-to-use-php81-syntax
Browse files Browse the repository at this point in the history
Update to use PHP 8.1 syntax
  • Loading branch information
gsteel authored Nov 3, 2024
2 parents b6a8450 + 3d0e01d commit 330af6b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Exception/RedisRuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function fromRedisException(RedisException $exception, Redis $redi
{
try {
$message = $redis->getLastError() ?? $exception->getMessage();
} catch (RedisException $exceptionThrownByGetLastErrorMethod) {
} catch (RedisException) {
$message = $exception->getMessage();
}

Expand Down
2 changes: 1 addition & 1 deletion src/RedisCluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function flush(): bool
$redis = new RedisFromExtension();
try {
$redis->connect($host, $port);
} catch (RedisException $exception) {
} catch (RedisException) {
continue;
}

Expand Down
5 changes: 1 addition & 4 deletions src/RedisClusterResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
*/
final class RedisClusterResourceManager implements RedisClusterResourceManagerInterface
{
private RedisClusterOptions $options;

public function __construct(RedisClusterOptions $options)
public function __construct(private readonly RedisClusterOptions $options)
{
$this->options = $options;
}

public function getResource(): RedisClusterFromExtension
Expand Down

0 comments on commit 330af6b

Please sign in to comment.