Skip to content

Continuous Integration #207

Continuous Integration

Continuous Integration #207

Triggered via create April 30, 2023 17:41
Status Failure
Total duration 49s
Artifacts
run  /  Generate test matrix
3s
run / Generate test matrix
Matrix: run / Code Coverage
Matrix: run / Coding Standards
Matrix: run / Lint composer.json
Matrix: run / Lint symfony container
Matrix: run / Mutation Tests
Matrix: run / Static Code Analysis
Matrix: run / Lint twig files
Matrix: run / Lint XLIFF files
Matrix: run / Lint YML files
Matrix: run / tests
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 10 warnings
run / Static Code Analysis (8.2): tests/Connection/PsrClientConnectionTest.php#L235
Call to an undefined method PHPUnit\Framework\MockObject\Rule\InvokedCount::numberOfInvocations().
run / Static Code Analysis (8.2)
Process completed with exit code 2.
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L52
Escaped Mutant for Mutator "CatchBlockRemoval": --- Original +++ New @@ @@ throw $e; } catch (Exception $e) { throw new ApiException('Technical error occurred.', 500, $e); - } catch (ClientExceptionInterface $e) { - throw new ApiException('Technical error occurred.', 500, $e); } } /**
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L56
Escaped Mutant for Mutator "Catch_": --- Original +++ New @@ @@ try { $response = $this->client->sendRequest($request); return $this->parseResponse($response); - } catch (ApiException|NotFoundException $e) { + } catch (ApiException $e) { throw $e; } catch (Exception $e) { throw new ApiException('Technical error occurred.', 500, $e);
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L59
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ } catch (ApiException|NotFoundException $e) { throw $e; } catch (Exception $e) { - throw new ApiException('Technical error occurred.', 500, $e); + throw new ApiException('Technical error occurred.', 499, $e); } catch (ClientExceptionInterface $e) { throw new ApiException('Technical error occurred.', 500, $e); }
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L59
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ } catch (ApiException|NotFoundException $e) { throw $e; } catch (Exception $e) { - throw new ApiException('Technical error occurred.', 500, $e); + throw new ApiException('Technical error occurred.', 501, $e); } catch (ClientExceptionInterface $e) { throw new ApiException('Technical error occurred.', 500, $e); }
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L78
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ if (JSON_ERROR_NONE !== json_last_error()) { throw new ApiException('Server did not reply with a valid response.', $response->getStatusCode()); } - if (404 === $response->getStatusCode()) { + if (403 === $response->getStatusCode()) { throw new NotFoundException('Server did not find any entity for the request.'); } if ($response->getStatusCode() >= 400) {
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L78
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ if (JSON_ERROR_NONE !== json_last_error()) { throw new ApiException('Server did not reply with a valid response.', $response->getStatusCode()); } - if (404 === $response->getStatusCode()) { + if (405 === $response->getStatusCode()) { throw new NotFoundException('Server did not find any entity for the request.'); } if ($response->getStatusCode() >= 400) {
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L82
Escaped Mutant for Mutator "GreaterThanOrEqualTo": --- Original +++ New @@ @@ if (404 === $response->getStatusCode()) { throw new NotFoundException('Server did not find any entity for the request.'); } - if ($response->getStatusCode() >= 400) { + if ($response->getStatusCode() > 400) { throw new ApiException('Technical error occurred.', $response->getStatusCode()); } return $array;
run / Mutation Tests (8.2): src/Connection/PsrClientConnection.php#L86
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ if ($response->getStatusCode() >= 400) { throw new ApiException('Technical error occurred.', $response->getStatusCode()); } - return $array; + return count($array) > 1 ? array_slice($array, 0, 1, true) : $array; } private function buildRequest(string $method, array $params, string $requestMethod) : RequestInterface {
run / Mutation Tests (8.2): src/Model/ArtistSearchResult.php#L92
Escaped Mutant for Mutator "UnwrapArrayMap": --- Original +++ New @@ @@ */ public static function fromApi(array $response) : self { - return new self(array_map(static function (array $data) : Artist { - return Artist::fromApi($data); - }, $response['artist']), (int) $response['page'], (int) $response['itemsPerPage'], (int) $response['total']); + return new self($response['artist'], (int) $response['page'], (int) $response['itemsPerPage'], (int) $response['total']); } }
run / Mutation Tests (8.2): src/Model/ArtistSearchResult.php#L98
Escaped Mutant for Mutator "CastInt": --- Original +++ New @@ @@ { return new self(array_map(static function (array $data) : Artist { return Artist::fromApi($data); - }, $response['artist']), (int) $response['page'], (int) $response['itemsPerPage'], (int) $response['total']); + }, $response['artist']), $response['page'], (int) $response['itemsPerPage'], (int) $response['total']); } }