X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Fredis%2FRedisConnRef.php;h=db2976092a316a761e74a88cdb1d73046aa5e549;hb=ac9fa2d3366958874efcc21761885c6930d87fb6;hp=bbcb267791adc7ba75fa575e3c214a42df5f1050;hpb=284bc0b5eb1c0e47d7100d5604ab4d5180dcd8d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/redis/RedisConnRef.php b/includes/libs/redis/RedisConnRef.php index bbcb267791..db2976092a 100644 --- a/includes/libs/redis/RedisConnRef.php +++ b/includes/libs/redis/RedisConnRef.php @@ -33,9 +33,10 @@ class RedisConnRef implements LoggerAwareInterface { protected $pool; /** @var Redis */ protected $conn; - - protected $server; // string - protected $lastError; // string + /** @var string */ + protected $server; + /** @var string|null */ + protected $lastError; /** * @var LoggerInterface @@ -44,22 +45,16 @@ class RedisConnRef implements LoggerAwareInterface { /** * 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; @@ -154,8 +149,8 @@ class RedisConnRef implements LoggerAwareInterface { * 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 ) { @@ -169,8 +164,8 @@ class RedisConnRef implements LoggerAwareInterface { * * @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 ) { @@ -184,8 +179,8 @@ class RedisConnRef implements LoggerAwareInterface { * * @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 ) { @@ -199,8 +194,8 @@ class RedisConnRef implements LoggerAwareInterface { * * @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 ) { @@ -210,7 +205,7 @@ class RedisConnRef implements LoggerAwareInterface { /** * 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() ) ) {