Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / libs / objectcache / RedisBagOStuff.php
index d852f82..432e6d6 100644 (file)
 /**
  * Redis-based caching module for redis server >= 2.6.12
  *
- * @note: avoid use of Redis::MULTI transactions for twemproxy support
+ * @note Avoid use of Redis::MULTI transactions for twemproxy support
+ *
+ * @ingroup Cache
+ * @ingroup Redis
  */
 class RedisBagOStuff extends BagOStuff {
        /** @var RedisConnectionPool */
@@ -321,7 +324,7 @@ class RedisBagOStuff extends BagOStuff {
         */
        protected function serialize( $data ) {
                // Serialize anything but integers so INCR/DECR work
-               // Do not store integer-like strings as integers to avoid type confusion (bug 60563)
+               // Do not store integer-like strings as integers to avoid type confusion (T62563)
                return is_int( $data ) ? $data : serialize( $data );
        }
 
@@ -393,9 +396,7 @@ class RedisBagOStuff extends BagOStuff {
         */
        protected function getMasterLinkStatus( RedisConnRef $conn ) {
                $info = $conn->info();
-               return isset( $info['master_link_status'] )
-                       ? $info['master_link_status']
-                       : null;
+               return $info['master_link_status'] ?? null;
        }
 
        /**