original_string: public function connect()
      {
          if ($this->object) {
              return true;
          }
  
          $this->object = new \Redis;
          $connect = $this->persistent ? 'pconnect' : 'connect';
          $result = $this->object->$connect($this->host, $this->port, $this->timeout);
  
          if ($result && $this->auth) {
              $result = $this->object->auth($this->auth);
          }
  
          if ($result) {
              foreach ($this->options as $key => $value) {
                  $this->object->setOption($key, $value);
              }
          }
  
          return $result;
      }
code: public function connect()
      {
          if ($this->object) {
              return true;
          }
  
          $this->object = new \Redis;
          $connect = $this->persistent ? 'pconnect' : 'connect';
          $result = $this->object->$connect($this->host, $this->port, $this->timeout);
  
          if ($result && $this->auth) {
              $result = $this->object->auth($this->auth);
          }
  
          if ($result) {
              foreach ($this->options as $key => $value) {
                  $this->object->setOption($key, $value);
              }
          }
  
          return $result;
      }
code_tokens: public function connect ( ) { if ( $ this -> object ) { return true ; } $ this -> object = new \ Redis ; $ connect = $ this -> persistent ? 'pconnect' : 'connect' ; $ result = $ this -> object -> $ connect ( $ this -> host , $ this -> port , $ this -> timeout ) ; if ( $ result && $ this -> auth ) { $ result = $ this -> object -> auth ( $ this -> auth ) ; } if ( $ result ) { foreach ( $ this -> options as $ key => $ value ) { $ this -> object -> setOption ( $ key , $ value ) ; } } return $ result ; }
docstring: Connect the redis server and set redis options
  
  @return bool true on success, false on error
docstring_tokens: Connect the redis server and set redis options