Skip to content

refactor(param-value-converter-registry): wider date converters input type and throw exception #1482

refactor(param-value-converter-registry): wider date converters input type and throw exception

refactor(param-value-converter-registry): wider date converters input type and throw exception #1482

Triggered via pull request January 29, 2025 10:52
Status Failure
Total duration 1m 0s
Artifacts

infection.yml

on: pull_request
Infection
47s
Infection
Fit to window
Zoom out
Zoom in

Annotations

1 error and 10 warnings
Infection
Process completed with exit code 1.
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/Http/RequestFactory.php#L116
Escaped Mutant for Mutator "FalseValue": @@ @@ if ($type === null) { continue; } - $streamElements[] = ['name' => 'param_' . $name, 'contents' => $this->paramValueConverterRegistry->get($type)($value, $type, false)]; + $streamElements[] = ['name' => 'param_' . $name, 'contents' => $this->paramValueConverterRegistry->get($type)($value, $type, true)]; } try { $body = new MultipartStream($streamElements);
Infection: src/Client/Http/RequestFactory.php#L123
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ } try { $body = new MultipartStream($streamElements); - $request = $request->withBody($body)->withHeader('Content-Type', 'multipart/form-data; boundary=' . $body->getBoundary()); + $request = $request->withBody($body)->withHeader('Content-Type', 'multipart/form-data; boundary='); } catch (InvalidArgumentException) { absurd(); }
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 {