Skip to content

Commit

Permalink
Update for amphp/socket 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Feb 6, 2023
1 parent 598ebc3 commit 1bdf01a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/Rfc6455Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Amp\Pipeline\ConcurrentIterator;
use Amp\Pipeline\DisposedException;
use Amp\Pipeline\Queue;
use Amp\Socket\EncryptableSocket;
use Amp\Socket\Socket;
use Amp\Socket\SocketAddress;
use Amp\Socket\TlsInfo;
Expand Down Expand Up @@ -109,7 +108,7 @@ public function getRemoteAddress(): SocketAddress

public function getTlsInfo(): ?TlsInfo
{
return $this->socket instanceof EncryptableSocket ? $this->socket->getTlsInfo() : null;
return $this->socket->getTlsInfo();
}

public function getCloseCode(): int
Expand Down
8 changes: 2 additions & 6 deletions test/WebsocketClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Amp\Future;
use Amp\PHPUnit\AsyncTestCase;
use Amp\Pipeline\Queue;
use Amp\Socket\EncryptableSocket;
use Amp\Socket\Socket;
use Amp\Socket\SocketException;
use Amp\Websocket\CloseCode;
Expand All @@ -22,12 +21,9 @@

class WebsocketClientTest extends AsyncTestCase
{
/**
* @return Socket&MockObject
*/
protected function createSocket(): Socket
protected function createSocket(): Socket&MockObject
{
return $this->createMock(EncryptableSocket::class);
return $this->createMock(Socket::class);
}

private function createClient(
Expand Down

0 comments on commit 1bdf01a

Please sign in to comment.