Merge "Introduce ApiMaxLagInfo hook"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactorySimple.php
index 9a6aa3a..0d7b812 100644 (file)
@@ -62,7 +62,7 @@ class LBFactorySimple extends LBFactory {
        public function __construct( array $conf ) {
                parent::__construct( $conf );
 
-               $this->servers = isset( $conf['servers'] ) ? $conf['servers'] : [];
+               $this->servers = $conf['servers'] ?? [];
                foreach ( $this->servers as $i => $server ) {
                        if ( $i == 0 ) {
                                $this->servers[$i]['master'] = true;
@@ -71,13 +71,9 @@ class LBFactorySimple extends LBFactory {
                        }
                }
 
-               $this->externalClusters = isset( $conf['externalClusters'] )
-                       ? $conf['externalClusters']
-                       : [];
-               $this->loadMonitorClass = isset( $conf['loadMonitorClass'] )
-                       ? $conf['loadMonitorClass']
-                       : 'LoadMonitor';
-               $this->maxLag = isset( $conf['maxLag'] ) ? $conf['maxLag'] : self::MAX_LAG_DEFAULT;
+               $this->externalClusters = $conf['externalClusters'] ?? [];
+               $this->loadMonitorClass = $conf['loadMonitorClass'] ?? 'LoadMonitor';
+               $this->maxLag = $conf['maxLag'] ?? self::MAX_LAG_DEFAULT;
        }
 
        /**