original_string: private function connection__redis() {
  		$this->connection = new \Redis();
  		# @note: This emits warning on failure instead of throwing
  		# exception, hence the @ sign.
  		if (!@$this->connection->connect(
  			$this->redishost, $this->redisport,
  			$this->redistimeout
  		))
  			// @codeCoverageIgnoreStart
  			return $this->connection_open_fail();
  			// @codeCoverageIgnoreEnd
  		if ($this->redispassword || $this->redisdatabase) {
  			try {
  				if ($this->redispassword)
  					$this->connection->auth($this->redispassword);
  				if ($this->redisdatabase)
  					$this->connection->select($this->redisdatabase);
  			} catch(\RedisException $e) {
  				return $this->connection_open_fail($e->getMessage());
  			}
  		}
  		try {
  			$this->connection->ping();
  		} catch(\RedisException $e) {
  			return $this->connection_open_fail($e->getMessage());
  		}
  		return $this->connection_open_ok();
  	}
code: private function connection__redis() {
  		$this->connection = new \Redis();
  		# @note: This emits warning on failure instead of throwing
  		# exception, hence the @ sign.
  		if (!@$this->connection->connect(
  			$this->redishost, $this->redisport,
  			$this->redistimeout
  		))
  			// @codeCoverageIgnoreStart
  			return $this->connection_open_fail();
  			// @codeCoverageIgnoreEnd
  		if ($this->redispassword || $this->redisdatabase) {
  			try {
  				if ($this->redispassword)
  					$this->connection->auth($this->redispassword);
  				if ($this->redisdatabase)
  					$this->connection->select($this->redisdatabase);
  			} catch(\RedisException $e) {
  				return $this->connection_open_fail($e->getMessage());
  			}
  		}
  		try {
  			$this->connection->ping();
  		} catch(\RedisException $e) {
  			return $this->connection_open_fail($e->getMessage());
  		}
  		return $this->connection_open_ok();
  	}
code_tokens: private function connection__redis ( ) { $ this -> connection = new \ Redis ( ) ; # @note: This emits warning on failure instead of throwing # exception, hence the @ sign. if ( ! @ $ this -> connection -> connect ( $ this -> redishost , $ this -> redisport , $ this -> redistimeout ) ) // @codeCoverageIgnoreStart return $ this -> connection_open_fail ( ) ; // @codeCoverageIgnoreEnd if ( $ this -> redispassword || $ this -> redisdatabase ) { try { if ( $ this -> redispassword ) $ this -> connection -> auth ( $ this -> redispassword ) ; if ( $ this -> redisdatabase ) $ this -> connection -> select ( $ this -> redisdatabase ) ; } catch ( \ RedisException $ e ) { return $ this -> connection_open_fail ( $ e -> getMessage ( ) ) ; } } try { $ this -> connection -> ping ( ) ; } catch ( \ RedisException $ e ) { return $ this -> connection_open_fail ( $ e -> getMessage ( ) ) ; } return $ this -> connection_open_ok ( ) ; }
docstring: Open connection with ext-redis.
docstring_tokens: Open connection with ext - redis .