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;
}
}
- $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;
}
/**