for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Starch\Middleware;
use Closure;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
class NextHandler implements RequestHandlerInterface
{
/**
* @var Closure
*/
private $next;
public function __construct(Closure $next)
$this->next = $next;
}
* @inheritdoc
public function handle(ServerRequestInterface $request): ResponseInterface
return ($this->next)($request);