protected function ping(Redis $redis) {
        try {
            if ($redis->ping() === false) {
                return false;
            }
        } catch (Exception $e) {
            return false;
        }
        return true;
    }
protected function ping(Redis $redis) {
        try {
            if ($redis->ping() === false) {
                return false;
            }
        } catch (Exception $e) {
            return false;
        }
        return true;
    }
protected function ping ( Redis $ redis ) { try { if ( $ redis -> ping ( ) === false ) { return false ; } } catch ( Exception $ e ) { return false ; } return true ; }
See if we can ping Redis server

@param Redis $redis
@return bool
See if we can ping Redis server