Skip to content

Commit 4bda6b3

Browse files
committed
Merge pull request #38 from clue-labs/api
Consistent public API
2 parents bfa68ed + 0b8f447 commit 4bda6b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Client.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Simple interface for executing redis commands
1111
*
12-
* @event data(ModelInterface $messageModel, Client $thisClient)
12+
* @event data(ModelInterface $messageModel)
1313
* @event error(Exception $error)
1414
* @event close()
1515
*
@@ -33,7 +33,7 @@ interface Client extends EventEmitterInterface
3333
*
3434
* @param string $name
3535
* @param string[] $args
36-
* @return PromiseInterface
36+
* @return PromiseInterface Promise<mixed, Exception>
3737
*/
3838
public function __call($name, $args);
3939

src/StreamingClient.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
use Clue\Redis\Protocol\Model\MultiBulkReply;
1919
use Clue\Redis\Protocol\Model\StatusReply;
2020

21+
/**
22+
* @internal
23+
*/
2124
class StreamingClient extends EventEmitter implements Client
2225
{
2326
private $stream;
@@ -122,7 +125,7 @@ public function __call($name, $args)
122125

123126
public function handleMessage(ModelInterface $message)
124127
{
125-
$this->emit('data', array($message, $this));
128+
$this->emit('data', array($message));
126129

127130
if ($this->monitoring && $this->isMonitorMessage($message)) {
128131
$this->emit('monitor', array($message));

0 commit comments

Comments
 (0)