refactor: convert dates to timestamps #1492
Annotations
10 warnings
Infection:
src/Client/Http/RequestFactory.php#L39
Escaped Mutant for Mutator "LogicalAnd":
@@ @@
/** @throws InvalidArgumentException */
public function __construct(private ParamValueConverterRegistry $paramValueConverterRegistry, private RequestFactoryInterface $requestFactory, private StreamFactoryInterface $streamFactory, UriFactoryInterface|null $uriFactory = null, UriInterface|string $uri = '')
{
- if ($uriFactory === null && $uri === '') {
+ if ($uriFactory === null || $uri === '') {
$uri = null;
} elseif (is_string($uri)) {
if ($uriFactory === null) {
|
Infection:
src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "Identical":
@@ @@
{
$query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986);
if ($this->uri === null) {
- $uri = $query === '' ? '' : '?' . $query;
+ $uri = $query !== '' ? '' : '?' . $query;
} else {
$uriQuery = $this->uri->getQuery();
try {
|
Infection:
src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "Concat":
@@ @@
{
$query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986);
if ($this->uri === null) {
- $uri = $query === '' ? '' : '?' . $query;
+ $uri = $query === '' ? '' : $query . '?';
} else {
$uriQuery = $this->uri->getQuery();
try {
|
Infection:
src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
{
$query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986);
if ($this->uri === null) {
- $uri = $query === '' ? '' : '?' . $query;
+ $uri = $query === '' ? '' : $query;
} else {
$uriQuery = $this->uri->getQuery();
try {
|
Infection:
src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
{
$query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986);
if ($this->uri === null) {
- $uri = $query === '' ? '' : '?' . $query;
+ $uri = $query === '' ? '' : '?';
} else {
$uriQuery = $this->uri->getQuery();
try {
|
Infection:
src/Client/Http/RequestFactory.php#L65
Escaped Mutant for Mutator "Ternary":
@@ @@
{
$query = http_build_query($requestSettings->settings + $additionalOptions, '', '&', PHP_QUERY_RFC3986);
if ($this->uri === null) {
- $uri = $query === '' ? '' : '?' . $query;
+ $uri = $query === '' ? '?' . $query : '';
} else {
$uriQuery = $this->uri->getQuery();
try {
|
Infection:
src/Client/PsrClickHouseAsyncClient.php#L122
Escaped Mutant for Mutator "NullSafeMethodCall":
@@ @@
return $response;
}
return $processResponse($response);
- }, fn() => $this->sqlLogger?->stopQuery($id));
+ }, fn() => $this->sqlLogger->stopQuery($id));
}
}
|
Infection:
src/Client/PsrClickHouseClient.php#L69
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
}
public function executeQueryWithParams(string $query, array $params, array $settings = []): void
{
- $this->executeRequest($this->sqlFactory->createWithParameters($query, $params), params: $params, settings: $settings);
+
}
public function select(string $query, Format $outputFormat, array $settings = []): Output
{
|
Infection:
src/Client/PsrClickHouseClient.php#L109
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
if ($values === []) {
throw CannotInsert::noValues();
}
- if (!$table instanceof Table) {
+ if (!false) {
$table = new Table($table);
}
$tableName = $table->fullName();
|
Infection:
src/Client/PsrClickHouseClient.php#L295
Escaped Mutant for Mutator "UnwrapFinally":
@@ @@
{
$id = uniqid('', true);
$this->sqlLogger?->startQuery($id, $sql);
- try {
- $response = $this->client->sendRequest($request);
- } finally {
- $this->sqlLogger?->stopQuery($id);
- }
+ $response = $this->client->sendRequest($request);
+ $this->sqlLogger?->stopQuery($id);
if ($response->getStatusCode() !== 200) {
throw ServerError::fromResponse($response);
}
|