fix tests #1993
Annotations
10 warnings
Run Infection for all files:
src/AcsfApi/AcsfClient.php#L15
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
public function processResponse(ResponseInterface $response) : mixed
{
$bodyJson = $response->getBody();
- $body = json_decode((string) $bodyJson, FALSE, 512, JSON_THROW_ON_ERROR);
+ $body = json_decode((string) $bodyJson, FALSE, 511, JSON_THROW_ON_ERROR);
// ACSF sometimes returns an array rather than an object.
if (is_array($body)) {
return $body;
|
Run Infection for all files:
src/AcsfApi/AcsfClient.php#L15
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
public function processResponse(ResponseInterface $response) : mixed
{
$bodyJson = $response->getBody();
- $body = json_decode((string) $bodyJson, FALSE, 512, JSON_THROW_ON_ERROR);
+ $body = json_decode((string) $bodyJson, FALSE, 513, JSON_THROW_ON_ERROR);
// ACSF sometimes returns an array rather than an object.
if (is_array($body)) {
return $body;
|
Run Infection for all files:
src/AcsfApi/AcsfClient.php#L30
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
throw new ApiErrorException($body);
}
// Throw error for 4xx and 5xx responses.
- if (property_exists($body, 'message') && in_array(substr((string) $response->getStatusCode(), 0, 1), ['4', '5'], TRUE)) {
+ if (property_exists($body, 'message') || in_array(substr((string) $response->getStatusCode(), 0, 1), ['4', '5'], TRUE)) {
$body->error = $response->getStatusCode();
throw new ApiErrorException($body);
}
|
Run Infection for all files:
src/AcsfApi/AcsfClientService.php#L18
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function getClient() : AcsfClient
{
$client = AcsfClient::factory($this->connector);
- $this->configureClient($client);
+
return $client;
}
protected function checkAuthentication() : bool
|
Run Infection for all files:
src/CloudApi/ClientService.php#L67
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
$this->machineIsAuthenticated = $this->checkAuthentication();
return $this->machineIsAuthenticated;
}
- protected function checkAuthentication() : bool
+ private function checkAuthentication() : bool
{
return $this->credentials->getCloudAccessToken() || $this->credentials->getCloudKey() && $this->credentials->getCloudSecret();
}
}
|
Run Infection for all files:
src/CloudApi/CloudCredentials.php#L43
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
if (!file_exists($file)) {
throw new AcquiaCliException('Access token expiry file not found at {file}', ['file' => $file]);
}
- return trim(file_get_contents($file), "\"\n");
+ return file_get_contents($file);
}
return NULL;
}
|
Run Infection for all files:
src/CloudApi/ConnectorFactory.php#L24
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
public function createConnector() : Connector|AccessTokenConnector
{
// A defined key & secret takes priority.
- if ($this->config['key'] && $this->config['secret']) {
+ if ($this->config['key'] || $this->config['secret']) {
return new Connector($this->config, $this->baseUri, $this->accountsUri);
}
// Fall back to a valid access token.
|
Run Infection for all files:
src/CloudApi/ConnectorFactory.php#L24
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
public function createConnector() : Connector|AccessTokenConnector
{
// A defined key & secret takes priority.
- if ($this->config['key'] && $this->config['secret']) {
+ if (!$this->config['key'] && $this->config['secret']) {
return new Connector($this->config, $this->baseUri, $this->accountsUri);
}
// Fall back to a valid access token.
|
Run Infection for all files:
src/CloudApi/ConnectorFactory.php#L24
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
public function createConnector() : Connector|AccessTokenConnector
{
// A defined key & secret takes priority.
- if ($this->config['key'] && $this->config['secret']) {
+ if ($this->config['key'] && !$this->config['secret']) {
return new Connector($this->config, $this->baseUri, $this->accountsUri);
}
// Fall back to a valid access token.
|
Run Infection for all files:
src/Command/Acsf/AcsfApiBaseCommand.php#L16
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
--- Original
+++ New
@@ @@
{
protected function checkAuthentication() : void
{
- if ($this->commandRequiresAuthentication() && !$this->cloudApiClientService->isMachineAuthenticated()) {
+ if (!$this->commandRequiresAuthentication() && $this->cloudApiClientService->isMachineAuthenticated()) {
throw new AcquiaCliException('This machine is not yet authenticated with the Acquia Cloud Site Factory. Run `acli auth:acsf-login`');
}
}
|
The logs for this run have expired and are no longer available.
Loading