original_string: protected function _connect()
      {
          try {
              $this->_Redis = new Redis();
              if (!empty($this->_config['unix_socket'])) {
                  $return = $this->_Redis->connect($this->_config['unix_socket']);
              } elseif (empty($this->_config['persistent'])) {
                  $return = $this->_Redis->connect($this->_config['server'], $this->_config['port'], $this->_config['timeout']);
              } else {
                  $persistentId = $this->_config['port'] . $this->_config['timeout'] . $this->_config['database'];
                  $return = $this->_Redis->pconnect($this->_config['server'], $this->_config['port'], $this->_config['timeout'], $persistentId);
              }
          } catch (RedisException $e) {
              return false;
          }
          if ($return && $this->_config['password']) {
              $return = $this->_Redis->auth($this->_config['password']);
          }
          if ($return) {
              $return = $this->_Redis->select($this->_config['database']);
          }
  
          return $return;
      }
code: protected function _connect()
      {
          try {
              $this->_Redis = new Redis();
              if (!empty($this->_config['unix_socket'])) {
                  $return = $this->_Redis->connect($this->_config['unix_socket']);
              } elseif (empty($this->_config['persistent'])) {
                  $return = $this->_Redis->connect($this->_config['server'], $this->_config['port'], $this->_config['timeout']);
              } else {
                  $persistentId = $this->_config['port'] . $this->_config['timeout'] . $this->_config['database'];
                  $return = $this->_Redis->pconnect($this->_config['server'], $this->_config['port'], $this->_config['timeout'], $persistentId);
              }
          } catch (RedisException $e) {
              return false;
          }
          if ($return && $this->_config['password']) {
              $return = $this->_Redis->auth($this->_config['password']);
          }
          if ($return) {
              $return = $this->_Redis->select($this->_config['database']);
          }
  
          return $return;
      }
code_tokens: protected function _connect ( ) { try { $ this -> _Redis = new Redis ( ) ; if ( ! empty ( $ this -> _config [ 'unix_socket' ] ) ) { $ return = $ this -> _Redis -> connect ( $ this -> _config [ 'unix_socket' ] ) ; } elseif ( empty ( $ this -> _config [ 'persistent' ] ) ) { $ return = $ this -> _Redis -> connect ( $ this -> _config [ 'server' ] , $ this -> _config [ 'port' ] , $ this -> _config [ 'timeout' ] ) ; } else { $ persistentId = $ this -> _config [ 'port' ] . $ this -> _config [ 'timeout' ] . $ this -> _config [ 'database' ] ; $ return = $ this -> _Redis -> pconnect ( $ this -> _config [ 'server' ] , $ this -> _config [ 'port' ] , $ this -> _config [ 'timeout' ] , $ persistentId ) ; } } catch ( RedisException $ e ) { return false ; } if ( $ return && $ this -> _config [ 'password' ] ) { $ return = $ this -> _Redis -> auth ( $ this -> _config [ 'password' ] ) ; } if ( $ return ) { $ return = $ this -> _Redis -> select ( $ this -> _config [ 'database' ] ) ; } return $ return ; }
docstring: Connects to a Redis server
  
  @return bool True if Redis server was connected
docstring_tokens: Connects to a Redis server