for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Conia\Chuck\Psr;
use Conia\Chuck\Exception\RuntimeException;
use GuzzleHttp\Psr7\HttpFactory;
use GuzzleHttp\Psr7\ServerRequest;
use Psr\Http\Message\ServerRequestInterface as PsrServerRequest;
use Throwable;
class Guzzle extends AbstractFactory
{
public function __construct()
try {
$this->streamFactory = $this->responseFactory = new HttpFactory();
// @codeCoverageIgnoreStart
} catch (Throwable) {
throw new RuntimeException('Install guzzlehttp/psr7');
// @codeCoverageIgnoreEnd
}
public function request(): PsrServerRequest
return ServerRequest::fromGlobals();