Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / libs / redis / RedisConnRef.php
index bbcb267..db29760 100644 (file)
@@ -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() ) ) {