Skip to content

Commit

Permalink
Add 'discard' function type-hint (uses in multi/exec) & adjust a few …
Browse files Browse the repository at this point in the history
…return type hints (#183)

* Add 'discard' function type-hint (uses in multi/exec)

* Adjust function type-hints to be more accurate

---------

Co-authored-by: Xon <[email protected]>
  • Loading branch information
Xon and Xon authored Oct 30, 2023
1 parent 5641140 commit f448b20
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public function __construct($message, $code = 0, $exception = null)
* Server/Connection:
* @method Credis_Client pipeline()
* @method Credis_Client multi()
* @method Credis_Client watch(string ...$keys)
* @method Credis_Client unwatch()
* @method Credis_Client|bool watch(string ...$keys)
* @method Credis_Client|bool unwatch()
* @method array exec()
* @method string|Credis_Client flushAll()
* @method string|Credis_Client flushDb()
* @method bool discard()
* @method Credis_Client|bool flushAll()
* @method Credis_Client|bool flushDb()
* @method array|Credis_Client info(string $section = null)
* @method bool|array|Credis_Client config(string $setGet, string $key, string $value = null)
* @method array|Credis_Client role()
Expand Down Expand Up @@ -162,8 +163,8 @@ public function __construct($message, $code = 0, $exception = null)
*
* Scripting:
* @method string|int|Credis_Client script(string $command, string $arg1 = null)
* @method string|int|array|bool|Credis_Client eval(string $script, array $keys = null, array $args = null)
* @method string|int|array|bool|Credis_Client evalSha(string $script, array $keys = null, array $args = null)
* @method string|int|array|bool|Credis_Client eval(string $script, array|string $keys = null, array|string $args = null)
* @method string|int|array|bool|Credis_Client evalSha(string $script, array|string $keys = null, array|string $args = null)
*/
class Credis_Client
{
Expand Down

0 comments on commit f448b20

Please sign in to comment.