for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace N1215\Jugoya\Wrapper;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
final class CallableHandler implements RequestHandlerInterface
{
/**
* @var callable
*/
private $callable;
* @param callable $callable
public function __construct(callable $callable)
$this->callable = $callable;
}
* @param ServerRequestInterface $request
* @return ResponseInterface
public function handle(ServerRequestInterface $request): ResponseInterface
return call_user_func($this->callable, $request);