File tree Expand file tree Collapse file tree 5 files changed +82
-3
lines changed
src/RedisClient/Command/Traits
tests/Integration/Version3x2 Expand file tree Collapse file tree 5 files changed +82
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ trait ServerCommandsTrait {
2121 * Time complexity: O(1)
2222 *
2323 * @param int $timeout
24- * @return true The command returns True or an error if the timeout is invalid.
24+ * @return bool The command returns True or an error if the timeout is invalid.
2525 */
2626 public function clientPause ($ timeout ) {
2727 return $ this ->returnCommand (['CLIENT ' , 'PAUSE ' ], [$ timeout ]);
Original file line number Diff line number Diff line change 1818use RedisClient \Command \Traits \Version2x8 \HyperLogLogCommandsTrait ;
1919use RedisClient \Command \Traits \Version3x0 \KeysCommandsTrait ;
2020use RedisClient \Command \Traits \Version2x6 \ListsCommandsTrait ;
21- use RedisClient \Command \Traits \Version2x6 \ScriptingCommandsTrait ;
22- use RedisClient \Command \Traits \Version2x9 \ServerCommandsTrait ;
2321use RedisClient \Command \Traits \Version3x0 \SortedSetsCommandsTrait ;
2422use RedisClient \Command \Traits \Version2x8 \StringsCommandsTrait ;
2523use RedisClient \Command \Traits \Version2x6 \TransactionsCommandsTrait ;
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of RedisClient.
4+ * git: https://github.com/cheprasov/php-redis-client
5+ *
6+ * (C) Alexander Cheprasov <cheprasov.84@ya.ru>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+ namespace RedisClient \Command \Traits \Version3x2 ;
12+
13+ use RedisClient \Command \Traits \Version2x6 \ScriptingCommandsTrait as ScriptingCommandsTraitVersion2x6 ;
14+
15+ /**
16+ * trait ScriptingCommandsTrait
17+ * @link http://redis.io/commands#hash
18+ */
19+ trait ScriptingCommandsTrait {
20+
21+ use ScriptingCommandsTraitVersion2x6;
22+
23+ /**
24+ * SCRIPT DEBUG YES|SYNC|NO
25+ * Available since 3.2.0.
26+ * Time complexity: O(1)
27+ * @link http://redis.io/commands/script-debug
28+ *
29+ * @param string $param YES|SYNC|NO
30+ * @return
31+ */
32+ public function scriptDebug ($ param ) {
33+ return $ this ->returnCommand (['SCRIPT ' , 'DEBUG ' ], [$ param ]);
34+ }
35+
36+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * This file is part of RedisClient.
4+ * git: https://github.com/cheprasov/php-redis-client
5+ *
6+ * (C) Alexander Cheprasov <cheprasov.84@ya.ru>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+ namespace RedisClient \Command \Traits \Version3x2 ;
12+
13+ use RedisClient \Command \Traits \Version2x9 \ServerCommandsTrait as ServerCommandsTraitVersion2x9 ;
14+ trait ServerCommandsTrait {
15+
16+ use ServerCommandsTraitVersion2x9;
17+
18+ /**
19+ * CLIENT REPLY ON|OFF|SKIP
20+ * Available since 3.2.
21+ * Time complexity: O(1)
22+ *
23+ * @param string $param
24+ * @return bool|null
25+ */
26+ public function clientReply ($ param ) {
27+ return $ this ->returnCommand (['CLIENT ' , 'REPLY ' ], [$ param ]);
28+ }
29+
30+ }
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ class ScriptingCommandsTest extends ScriptingCommandsTestVersion3x0 {
2222
2323 const TEST_REDIS_SERVER_1 = TEST_REDIS_SERVER_3x2_1 ;
2424
25+ /**
26+ * @var RedisClient3x2;
27+ */
28+ protected static $ Redis ;
29+
2530 /**
2631 * @inheritdoc
2732 */
@@ -31,4 +36,14 @@ public static function setUpBeforeClass() {
3136 'timeout ' => 2 ,
3237 ]);
3338 }
39+
40+ /**
41+ * @see ScriptingCommandsTrait::scriptDebug
42+ */
43+ public function test_scriptDebug () {
44+ $ Redis = static ::$ Redis ;
45+ $ this ->assertSame (true , $ Redis ->scriptDebug ('SYNC ' ));
46+ $ this ->assertSame (true , $ Redis ->scriptDebug ('YES ' ));
47+ $ this ->assertSame (true , $ Redis ->scriptDebug ('NO ' ));
48+ }
3449}
You can’t perform that action at this time.
0 commit comments