Fix return typehint
authorJakub Vrana <jakub@vrana.cz>
Sat, 1 Dec 2018 08:58:42 +0000 (09:58 +0100)
committerThiemo Kreuz (WMDE) <thiemo.kreuz@wikimedia.de>
Tue, 11 Dec 2018 12:35:21 +0000 (12:35 +0000)
Found by PHPStan.

Change-Id: I2e649aa85c84925886b6acfba2bbdde1a4f12214

includes/libs/redis/RedisConnRef.php

index a73fac1..d09620b 100644 (file)
@@ -44,22 +44,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;
 
@@ -210,7 +204,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() ) ) {