@@ -362,6 +362,26 @@ public function exists( $key ) {}
362
362
*/
363
363
public function incr ( $ key ) {}
364
364
365
+ /**
366
+ * Increment the float value of a key by the given amount
367
+ *
368
+ * @param string $key
369
+ * @param float $increment
370
+ * @return float
371
+ * @link http://redis.io/commands/incrbyfloat
372
+ * @example
373
+ * <pre>
374
+ * $redis = new Redis();
375
+ * $redis->connect('127.0.0.1');
376
+ * $redis->set('x', 3);
377
+ * var_dump( $redis->incrByFloat('x', 1.5) ); // float(4.5)
378
+ *
379
+ * // ! SIC
380
+ * var_dump( $redis->get('x') ); // string(3) "4.5"
381
+ * </pre>
382
+ */
383
+ public function incrByFloat( $ key , $ increment )
384
+
365
385
/**
366
386
* Increment the number stored at key by one. If the second argument is filled, it will be used as the integer
367
387
* value of the increment.
@@ -1734,8 +1754,11 @@ public function sort( $key, $option = null ) {}
1734
1754
1735
1755
1736
1756
/**
1737
- * Returns an associative array of strings and integers, with the following keys:
1757
+ * Returns an associative array of strings and integers
1758
+ * @param string $option Optional. The option to provide redis.
1759
+ * SERVER | CLIENTS | MEMORY | PERSISTENCE | STATS | REPLICATION | CPU | CLASTER | KEYSPACE | COMANDSTATS
1738
1760
*
1761
+ * Returns an associative array of strings and integers, with the following keys:
1739
1762
* - redis_version
1740
1763
* - redis_git_sha1
1741
1764
* - redis_git_dirty
@@ -1781,7 +1804,7 @@ public function sort( $key, $option = null ) {}
1781
1804
* @link http://redis.io/commands/info
1782
1805
* @example $redis->info();
1783
1806
*/
1784
- public function info ( ) {}
1807
+ public function info ( $ option = null ) {}
1785
1808
1786
1809
/**
1787
1810
* Resets the statistics reported by Redis using the INFO command (`info()` function).
@@ -2556,6 +2579,34 @@ public function hExists( $key, $hashKey ) {}
2556
2579
*/
2557
2580
public function hIncrBy ( $ key , $ hashKey , $ value ) {}
2558
2581
2582
+ /**
2583
+ * Increment the float value of a hash field by the given amount
2584
+ * @param string $key
2585
+ * @param string $field
2586
+ * @param float $increment
2587
+ * @return float
2588
+ * @link http://redis.io/commands/hincrbyfloat
2589
+ * @example
2590
+ * <pre>
2591
+ * $redis = new Redis();
2592
+ * $redis->connect('127.0.0.1');
2593
+ * $redis->hset('h', 'float', 3);
2594
+ * $redis->hset('h', 'int', 3);
2595
+ * var_dump( $redis->hIncrByFloat('h', 'float', 1.5) ); // float(4.5)
2596
+ *
2597
+ * var_dump( $redis->hGetAll('h') );
2598
+ *
2599
+ * // Output
2600
+ * array(2) {
2601
+ * ["float"]=>
2602
+ * string(3) "4.5"
2603
+ * ["int"]=>
2604
+ * string(1) "3"
2605
+ * }
2606
+ * </pre>
2607
+ */
2608
+ public function hIncrByFloat ( $ key , $ field , $ increment ) {}
2609
+
2559
2610
/**
2560
2611
* Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast.
2561
2612
* NULL values are stored as empty strings
0 commit comments