optional query #1848
Annotations
3 warnings
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
infection:
src/Service/PhraseTagService.php#L65
Escaped Mutant for Mutator "UnwrapArrayFilter":
@@ @@
public function tag(?string $key, array $tags, array $addTags): int
{
$query = $this->createQuery($key, $tags);
- $body = array_filter(['q' => $query, 'tags' => implode(',', $addTags)], static fn(string $value): bool => '' !== $value);
+ $body = ['q' => $query, 'tags' => implode(',', $addTags)];
$response = $this->httpClient->request('PATCH', 'keys/tag', ['query' => ['page' => '1', 'per_page' => '100'], 'body' => $body]);
if (200 !== $statusCode = $response->getStatusCode()) {
throw new ProviderException(sprintf('phrase replied with an error (%d): "%s"', $statusCode, $response->getContent(false)), $response);
|
infection:
src/Service/PhraseTagService.php#L99
Escaped Mutant for Mutator "UnwrapArrayFilter":
@@ @@
public function untag(?string $key, array $tags, array $removeTags): int
{
$query = $this->createQuery($key, $tags);
- $body = array_filter(['q' => $query, 'tags' => implode(',', $removeTags)], static fn(string $value): bool => '' !== $value);
+ $body = ['q' => $query, 'tags' => implode(',', $removeTags)];
$response = $this->httpClient->request('PATCH', 'keys/untag', ['query' => ['page' => '1', 'per_page' => '100'], 'body' => $body]);
if (200 !== $statusCode = $response->getStatusCode()) {
throw new ProviderException(sprintf('phrase replied with an error (%d): "%s"', $statusCode, $response->getContent(false)), $response);
|
Loading