fix: allow underscores in param names (#282) #1470
Annotations
11 warnings
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run 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) {
|
Run 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 {
|
Run 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 {
|
Run 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 {
|
Run 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 {
|
Run 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 {
|
Run Infection:
src/Client/Http/RequestFactory.php#L87
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
{
$request = $this->initRequest($requestSettings);
preg_match_all('~\{([a-zA-Z\d_]+):([a-zA-Z\d ]+(\(.+\))?)}~', $sql, $matches);
- if ($matches[0] === []) {
+ if ($matches[1] === []) {
$body = $this->streamFactory->createStream($sql);
try {
return $request->withBody($body);
|
Run 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);
|
Run 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));
}
}
|
Run 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
{
|
Loading