Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/core/Database/RedisConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class RedisConfig

protected float $read_timeout = 0.0;

protected string $auth = '';
/** @var string|string[] */
protected string|array $auth = '';

protected int $dbIndex = 0;

Expand Down Expand Up @@ -100,12 +101,18 @@ public function withReadTimeout(float $read_timeout): self
return $this;
}

public function getAuth(): string
/**
* @return string|string[]
*/
public function getAuth(): string|array
{
return $this->auth;
}

public function withAuth(string $auth): self
/**
* @param string|string[] $auth string for password only, array for [username, password]
*/
public function withAuth(string|array $auth): self
{
$this->auth = $auth;
return $this;
Expand Down