Use PHP 7 '??' operator instead of if-then-else
[lhc/web/wiklou.git] / includes / libs / objectcache / RedisBagOStuff.php
index a8047b0..a473210 100644 (file)
@@ -81,11 +81,7 @@ class RedisBagOStuff extends BagOStuff {
                        $this->serverTagMap[is_int( $key ) ? $server : $key] = $server;
                }
 
-               if ( isset( $params['automaticFailover'] ) ) {
-                       $this->automaticFailover = $params['automaticFailover'];
-               } else {
-                       $this->automaticFailover = true;
-               }
+               $this->automaticFailover = $params['automaticFailover'] ?? true;
 
                $this->attrMap[self::ATTR_SYNCWRITES] = self::QOS_SYNCWRITES_NONE;
        }