Skip to content

Commit c5ac28b

Browse files
authored
Merge pull request #93 from clue-labs/right-connection
Fix ConnectionInterface return type hint in Factory
2 parents 780d55c + f493854 commit c5ac28b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Factory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use React\Promise\Timer\TimeoutException;
1313
use React\Socket\Connector;
1414
use React\Socket\ConnectorInterface;
15-
use React\Socket\ConnectionInterface;
15+
use React\Socket\ConnectionInterface as SocketConnectionInterface;
1616
use React\MySQL\Io\LazyConnection;
1717

1818
class Factory
@@ -146,13 +146,13 @@ public function createConnection($uri)
146146
$reject(new \RuntimeException('Connection to database server cancelled'));
147147

148148
// either close successful connection or cancel pending connection attempt
149-
$connecting->then(function (ConnectionInterface $connection) {
149+
$connecting->then(function (SocketConnectionInterface $connection) {
150150
$connection->close();
151151
});
152152
$connecting->cancel();
153153
});
154154

155-
$connecting->then(function (ConnectionInterface $stream) use ($parts, $deferred) {
155+
$connecting->then(function (SocketConnectionInterface $stream) use ($parts, $deferred) {
156156
$executor = new Executor();
157157
$parser = new Parser($stream, $executor);
158158

0 commit comments

Comments
 (0)