Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Client/PsrClickHouseAsyncClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

use function uniqid;

readonly class PsrClickHouseAsyncClient implements ClickHouseAsyncClient
class PsrClickHouseAsyncClient implements ClickHouseAsyncClient
{
private SqlFactory $sqlFactory;

Expand Down Expand Up @@ -98,14 +98,14 @@
);

$id = uniqid('', true);
$this->sqlLogger?->startQuery($id, $sql);

Check warning on line 101 in src/Client/PsrClickHouseAsyncClient.php

View workflow job for this annotation

GitHub Actions / Infection

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $request = $this->requestFactory->prepareSqlRequest($sql, new RequestSettings($this->defaultSettings, $settings), new RequestOptions($params)); $id = uniqid('', true); - $this->sqlLogger?->startQuery($id, $sql); + return Create::promiseFor($this->asyncClient->sendAsyncRequest($request))->then(function (ResponseInterface $response) use ($id, $processResponse) { $this->sqlLogger?->stopQuery($id); if ($response->getStatusCode() !== 200) {

return Create::promiseFor(
$this->asyncClient->sendAsyncRequest($request),
)
->then(
function (ResponseInterface $response) use ($id, $processResponse) {
$this->sqlLogger?->stopQuery($id);

Check warning on line 108 in src/Client/PsrClickHouseAsyncClient.php

View workflow job for this annotation

GitHub Actions / Infection

Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ $id = uniqid('', true); $this->sqlLogger?->startQuery($id, $sql); return Create::promiseFor($this->asyncClient->sendAsyncRequest($request))->then(function (ResponseInterface $response) use ($id, $processResponse) { - $this->sqlLogger?->stopQuery($id); + if ($response->getStatusCode() !== 200) { throw ServerError::fromResponse($response); }

if ($response->getStatusCode() !== 200) {
throw ServerError::fromResponse($response);
Expand All @@ -117,7 +117,7 @@

return $processResponse($response);
},
fn () => $this->sqlLogger?->stopQuery($id),

Check warning on line 120 in src/Client/PsrClickHouseAsyncClient.php

View workflow job for this annotation

GitHub Actions / Infection

Escaped Mutant for Mutator "NullSafeMethodCall": @@ @@ return $response; } return $processResponse($response); - }, fn() => $this->sqlLogger?->stopQuery($id)); + }, fn() => $this->sqlLogger->stopQuery($id)); } }
);
}
}
2 changes: 1 addition & 1 deletion src/Client/PsrClickHouseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
use function sprintf;
use function uniqid;

readonly class PsrClickHouseClient implements ClickHouseClient
class PsrClickHouseClient implements ClickHouseClient
{
private ValueFormatter $valueFormatter;

Expand Down
Loading