source/Redis/Connection.php
public function incr($key, $value = 1) {
        $value = (int) $value;
        try {
            $result = ($value > 1)
                ? $this->getRedis()->incrBy($key, $value)
                : $this->getRedis()->incr($key);
            if ($result !== false) {
                return $result;
            }
            throw new ImpossibleValueException();
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function incr($key, $value = 1) {
        $value = (int) $value;
        try {
            $result = ($value > 1)
                ? $this->getRedis()->incrBy($key, $value)
                : $this->getRedis()->incr($key);
            if ($result !== false) {
                return $result;
            }
            throw new ImpossibleValueException();
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
public function incr ( $ key , $ value = 1 ) { $ value = ( int ) $ value ; try { $ result = ( $ value > 1 ) ? $ this -> getRedis ( ) -> incrBy ( $ key , $ value ) : $ this -> getRedis ( ) -> incr ( $ key ) ; if ( $ result !== false ) { return $ result ; } throw new ImpossibleValueException ( ) ; } catch ( RedisException $ ex ) { throw new ConnectException ( ) ; } }
Increment key value
@param string $key key
@param int $value value for increment
@return int current value
@throws ConnectException exception on connection to redis instance
Increment key value