- Output for 5.3.29, 8.0.1 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
<?php
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use React\Promise\PromiseInterface;
interface MiddlewareInterface
{
/**
* @param RequestInterface $request
* @param callable $next
* @return PromiseInterface<ResponseInterface>|ResponseInterface
*/
public function __invoke(RequestInterface $request, callable $next);
}
final class BrowserMiddlewareStub implements MiddlewareInterface
{
/** @var ResponseInterface */
private $response;
public function __construct(ResponseInterface $response)
{
$this->response = $response;
}
/**
* @param RequestInterface $request
* @param callable $next
* @return PromiseInterface<ResponseInterface>|ResponseInterface
*/
public function __invoke(RequestInterface $request, callable $next)
{
return $this->response;
}
}