* @return Redis
*/
public static function connect($config) {
- $host = isset($config['host']) ? $config['host'] : self::DEFAULT_HOST;
- $port = isset($config['port']) ? $config['port'] : self::DEFAULT_PORT;
+ $host = $config['host'] ?? self::DEFAULT_HOST;
+ $port = $config['port'] ?? self::DEFAULT_PORT;
// Ugh.
$pass = CRM_Utils_Constant::value('CIVICRM_DB_CACHE_PASSWORD');
$id = implode(':', ['connect', $host, $port /* $pass is constant */]);