protected $pool;
/** @var Redis */
protected $conn;
-
- protected $server; // string
- protected $lastError; // string
+ /** @var string */
+ protected $server;
+ /** @var string|null */
+ protected $lastError;
/**
* @var LoggerInterface
/**
* No authentication errors.
- *
- * @var constant
*/
const AUTH_NO_ERROR = 200;
/**
* Temporary authentication error; recovered by reauthenticating.
- *
- * @var constant
*/
const AUTH_ERROR_TEMPORARY = 201;
/**
* Authentication error was permanent and could not be recovered.
- *
- * @var constant
*/
const AUTH_ERROR_PERMANENT = 202;
* See: https://github.com/phpredis/phpredis#scan
*
* @param int &$iterator
- * @param string $pattern
- * @param int $count
+ * @param string|null $pattern
+ * @param int|null $count
* @return array $res
*/
public function scan( &$iterator, $pattern = null, $count = null ) {
*
* @param string $key
* @param int &$iterator
- * @param string $pattern
- * @param int $count
+ * @param string|null $pattern
+ * @param int|null $count
* @return array $res
*/
public function sScan( $key, &$iterator, $pattern = null, $count = null ) {
*
* @param string $key
* @param int &$iterator
- * @param string $pattern
- * @param int $count
+ * @param string|null $pattern
+ * @param int|null $count
* @return array $res
*/
public function hScan( $key, &$iterator, $pattern = null, $count = null ) {
*
* @param string $key
* @param int &$iterator
- * @param string $pattern
- * @param int $count
+ * @param string|null $pattern
+ * @param int|null $count
* @return array $res
*/
public function zScan( $key, &$iterator, $pattern = null, $count = null ) {
/**
* Handle authentication errors and automatically reauthenticate.
*
- * @return constant self::AUTH_NO_ERROR, self::AUTH_ERROR_TEMPORARY, or self::AUTH_ERROR_PERMANENT
+ * @return int self::AUTH_NO_ERROR, self::AUTH_ERROR_TEMPORARY, or self::AUTH_ERROR_PERMANENT
*/
private function checkAuthentication() {
if ( preg_match( '/^ERR operation not permitted\b/', $this->conn->getLastError() ) ) {