99use Psr \Http \Message \StreamFactoryInterface ;
1010use Psr \Http \Message \StreamInterface ;
1111use RuntimeException ;
12+ use Yiisoft \DataResponse \Formatter \JsonDataResponseFormatter ;
1213
1314use function ftruncate ;
1415use function is_callable ;
2223 * A wrapper around PSR-7 response that is assigned raw data to be formatted with a formatter later.
2324 *
2425 * For example, `['name' => 'Dmitriy']` to be formatted as JSON using
25- * {@see \Yiisoft\DataResponse\Formatter\ JsonDataResponseFormatter} when {@see DataResponse::getBody()} is called.
26+ * {@see JsonDataResponseFormatter} when {@see DataResponse::getBody()} is called.
2627 */
2728final class DataResponse implements ResponseInterface
2829{
@@ -49,7 +50,7 @@ public function __construct(
4950 int $ code ,
5051 string $ reasonPhrase ,
5152 ResponseFactoryInterface $ responseFactory ,
52- StreamFactoryInterface $ streamFactory
53+ StreamFactoryInterface $ streamFactory,
5354 ) {
5455 $ this ->createResponse ($ code , $ reasonPhrase , $ responseFactory , $ streamFactory );
5556 }
@@ -313,7 +314,7 @@ private function createResponse(
313314 int $ code ,
314315 string $ reasonPhrase ,
315316 ResponseFactoryInterface $ responseFactory ,
316- StreamFactoryInterface $ streamFactory
317+ StreamFactoryInterface $ streamFactory,
317318 ): void {
318319 $ response = $ responseFactory ->createResponse ($ code , $ reasonPhrase );
319320 $ stream = $ response ->getBody ();
0 commit comments