Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
[lhc/web/wiklou.git] / includes / libs / lockmanager / DBLockManager.php
index b17b1a0..564616d 100644 (file)
  * @ingroup LockManager
  */
 
+use Wikimedia\Rdbms\Database;
+use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\DBError;
+
 /**
  * Version of LockManager based on using named/row DB locks.
  *
@@ -86,9 +90,7 @@ abstract class DBLockManager extends QuorumLockManager {
 
                // Tracks peers that couldn't be queried recently to avoid lengthy
                // connection timeouts. This is useless if each bucket has one peer.
-               $this->statusCache = isset( $config['srvCache'] )
-                       ? $config['srvCache']
-                       : new HashBagOStuff();
+               $this->statusCache = $config['srvCache'] ?? new HashBagOStuff();
        }
 
        /**