Skip to content
Merged
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
3 changes: 2 additions & 1 deletion src/Plugin/VersionBridgePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Http\Client\Common\Plugin;

use Http\Promise\Promise;
use Psr\Http\Message\RequestInterface;

/**
Expand All @@ -14,7 +15,7 @@ trait VersionBridgePlugin
{
abstract protected function doHandleRequest(RequestInterface $request, callable $next, callable $first);

public function handleRequest(RequestInterface $request, callable $next, callable $first)
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
return $this->doHandleRequest($request, $next, $first);
}
Expand Down
3 changes: 2 additions & 1 deletion src/VersionBridgeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Http\Client\Common;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;

/**
* A client that helps you migrate from php-http/httplug 1.x to 2.x. This
Expand All @@ -14,7 +15,7 @@ trait VersionBridgeClient
{
abstract protected function doSendRequest(RequestInterface $request);

public function sendRequest(RequestInterface $request)
public function sendRequest(RequestInterface $request): ResponseInterface
{
return $this->doSendRequest($request);
}
Expand Down