Skip to content

fix: support for more complex Array Tuple params #1415

fix: support for more complex Array Tuple params

fix: support for more complex Array Tuple params #1415

Triggered via pull request October 21, 2024 10:27
@simPodsimPod
opened #268
code
Status Success
Total duration 54s
Artifacts

infection.yml

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

Annotations

3 warnings
Infection: src/Client/PsrClickHouseClient.php#L62
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#L73
Escaped Mutant for Mutator "Catch_": @@ @@ { try { return $this->selectWithParams($query, params: [], outputFormat: $outputFormat, settings: $settings); - } catch (UnsupportedParamValue|UnsupportedParamType) { + } catch (UnsupportedParamType) { absurd(); } }
Infection: src/Sql/ValueFormatter.php#L99
Escaped Mutant for Mutator "UnwrapArrayMap": @@ @@ throw UnsupportedParamValue::value($value); } $firstValue = $value[array_key_first($value)]; - $mapper = is_array($firstValue) ? fn($value): string => sprintf('(%s)', implode(',', array_map(fn($val) => $this->format($val), $value))) : fn($value): string => $value === null ? 'NULL' : $this->format($value); + $mapper = is_array($firstValue) ? fn($value): string => sprintf('(%s)', implode(',', $value)) : fn($value): string => $value === null ? 'NULL' : $this->format($value); return implode(',', array_map($mapper, $value)); } return $this->formatArray($value);