Skip to content

Commit 3426ea9

Browse files
committed
Remove redundant property
1 parent 98efc08 commit 3426ea9

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Collector/Web/RequestCollector.php

-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Yiisoft\Yii\Debug\Collector\Web;
66

77
use GuzzleHttp\Psr7\Message;
8-
use JsonException;
98
use Psr\Http\Message\ResponseInterface;
109
use Psr\Http\Message\ServerRequestInterface;
1110
use Yiisoft\Yii\Debug\Collector\CollectorTrait;
@@ -39,21 +38,6 @@ public function getCollected(): array
3938
if (!$this->isActive()) {
4039
return [];
4140
}
42-
$content = null;
43-
if ($this->response !== null) {
44-
$stream = $this->response->getBody();
45-
if ($stream->isReadable() && $stream->isSeekable()) {
46-
$position = $stream->tell();
47-
$stream->rewind();
48-
$content = $stream->getContents();
49-
try {
50-
$content = json_decode($content, associative: true, flags: JSON_THROW_ON_ERROR);
51-
} catch (JsonException) {
52-
// pass
53-
}
54-
$stream->seek($position);
55-
}
56-
}
5741

5842
$requestRaw = null;
5943
if ($this->request instanceof ServerRequestInterface) {
@@ -79,7 +63,6 @@ public function getCollected(): array
7963
'requestRaw' => $requestRaw,
8064
'response' => $this->response,
8165
'responseRaw' => $responseRaw,
82-
'content' => $content,
8366
];
8467
}
8568

0 commit comments

Comments
 (0)