Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Psr\Http\Message\UriInterface as an allowed type for $url args #125

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public function __construct(LoopInterface $loop, ConnectorInterface $connector =
}

/**
* @param string $url
* @param array $subProtocols
* @param array $headers
* @param string|\Psr\Http\Message\UriInterface $url
* @param array $subProtocols
* @param array $headers
* @return \React\Promise\PromiseInterface
*/
public function __invoke($url, array $subProtocols = [], array $headers = []) {
Expand Down Expand Up @@ -116,9 +116,9 @@ public function __invoke($url, array $subProtocols = [], array $headers = []) {
}

/**
* @param string $url
* @param array $subProtocols
* @param array $headers
* @param string|\Psr\Http\Message\UriInterface $url
* @param array $subProtocols
* @param array $headers
* @throws \InvalidArgumentException
* @return \Psr\Http\Message\RequestInterface
*/
Expand Down
8 changes: 4 additions & 4 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use React\EventLoop\Timer\Timer;

/**
* @param string $url
* @param array $subProtocols
* @param array $headers
* @param LoopInterface|null $loop
* @param string|\Psr\Http\Message\UriInterface $url
* @param array $subProtocols
* @param array $headers
* @param LoopInterface|null $loop
* @return \React\Promise\PromiseInterface<\Ratchet\Client\WebSocket>
*/
function connect($url, array $subProtocols = [], $headers = [], LoopInterface $loop = null) {
Expand Down