for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yiisoft\Yii\Web;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamFactoryInterface;
class WebResponseFactory implements WebResponseFactoryInterface
{
protected ResponseFactoryInterface $responseFactory;
public function __construct(ResponseFactoryInterface $responseFactory)
$this->responseFactory = $responseFactory;
}
public function createResponse($data = null, int $code = 200, string $reasonPhrase = ''): ResponseInterface
return new WebResponse($data, $code, $this->responseFactory);