Revert "Update DatabaseResponse.php (#469)" (#477) #763
mt.yml
on: push
Mutation Testing Code Review Annotations
35s
Annotations
8 warnings
Mutation Testing Code Review Annotations
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Mutation Testing Code Review Annotations:
src/Connector/Client.php#L164
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
}
$body_json = $response->getBody();
- $body = json_decode($body_json, null, 512, JSON_THROW_ON_ERROR);
+ $body = json_decode($body_json, null, 511, JSON_THROW_ON_ERROR);
// Internal server errors may also return a 200 response and empty body.
if (is_null($body)) {
throw new RuntimeException('Response contained an empty body. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
|
Mutation Testing Code Review Annotations:
src/Connector/Client.php#L164
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
throw new RuntimeException('Cloud API internal server error. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
}
$body_json = $response->getBody();
- $body = json_decode($body_json, null, 512, JSON_THROW_ON_ERROR);
+ $body = json_decode($body_json, null, 513, JSON_THROW_ON_ERROR);
// Internal server errors may also return a 200 response and empty body.
if (is_null($body)) {
throw new RuntimeException('Response contained an empty body. Status ' . $response->getStatusCode() . '. Request ID ' . $response->getHeaderLine('X-Request-Id'));
|
Mutation Testing Code Review Annotations:
src/Connector/Connector.php#L97
Escaped Mutant for Mutator "LogicalOrSingleSubExprNegation":
--- Original
+++ New
@@ @@
*/
public function createRequest(string $verb, string $path): RequestInterface
{
- if (!isset($this->accessToken) || $this->accessToken->hasExpired()) {
+ if (!isset($this->accessToken) || !$this->accessToken->hasExpired()) {
$xdgCacheHome = getenv('XDG_CACHE_HOME');
if (!$xdgCacheHome) {
$xdgCacheHome = Path::join(Path::getHomeDirectory(), '.cache');
|
Mutation Testing Code Review Annotations:
src/Connector/Connector.php#L106
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
/** @infection-ignore-all */
$cache = new FilesystemAdapter('cache', 300, $directory);
$orgUuid = getenv('AH_ORGANIZATION_UUID');
- $cacheKey = 'cloudapi-token-' . $this->clientId . $orgUuid;
+ $cacheKey = 'cloudapi-token-' . $orgUuid . $this->clientId;
$accessToken = $cache->get($cacheKey, function () use ($orgUuid) {
$options = [];
if ($orgUuid) {
|
Mutation Testing Code Review Annotations:
src/Connector/Connector.php#L106
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
/** @infection-ignore-all */
$cache = new FilesystemAdapter('cache', 300, $directory);
$orgUuid = getenv('AH_ORGANIZATION_UUID');
- $cacheKey = 'cloudapi-token-' . $this->clientId . $orgUuid;
+ $cacheKey = 'cloudapi-token-' . $this->clientId;
$accessToken = $cache->get($cacheKey, function () use ($orgUuid) {
$options = [];
if ($orgUuid) {
|
Mutation Testing Code Review Annotations:
src/Connector/Connector.php#L109
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
$cacheKey = 'cloudapi-token-' . $this->clientId . $orgUuid;
$accessToken = $cache->get($cacheKey, function () use ($orgUuid) {
$options = [];
- if ($orgUuid) {
+ if (!$orgUuid) {
$options['scope'] = 'organization:' . $orgUuid;
}
return $this->provider->getAccessToken('client_credentials', $options);
|
Mutation Testing Code Review Annotations:
src/Response/MemberResponse.php#L36
Escaped Mutant for Mutator "ElseIfNegation":
--- Original
+++ New
@@ @@
$this->last_name = $member->last_name;
if (property_exists($member, 'mail')) {
$this->mail = $member->mail;
- } elseif (property_exists($member, 'email')) {
+ } elseif (!property_exists($member, 'email')) {
$this->mail = $member->email;
}
$this->picture_url = $member->picture_url;
|