Skip to content

Commit 2a6ff86

Browse files
committed
refactor: change constant name
1 parent 90adf46 commit 2a6ff86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Session/Handlers/RedisHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class RedisHandler extends BaseHandler
2424
{
25-
private const REDIS_DEFAULT_PORT = 6379;
25+
private const DEFAULT_PORT = 6379;
2626

2727
/**
2828
* phpRedis instance
@@ -92,7 +92,7 @@ protected function setSavePath(): void
9292

9393
$this->savePath = [
9494
'host' => $matches[1],
95-
'port' => empty($matches[2]) ? self::REDIS_DEFAULT_PORT : $matches[2],
95+
'port' => empty($matches[2]) ? self::DEFAULT_PORT : $matches[2],
9696
'password' => preg_match('#auth=([^\s&]+)#', $matches[3], $match) ? $match[1] : null,
9797
'database' => preg_match('#database=(\d+)#', $matches[3], $match) ? (int) $match[1] : 0,
9898
'timeout' => preg_match('#timeout=(\d+\.\d+|\d+)#', $matches[3], $match) ? (float) $match[1] : 0.0,

0 commit comments

Comments
 (0)