Coding standards v3 #2396
Annotations
1 error and 10 warnings
|
src/AcsfApi/AcsfClient.php#L16
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;
|
src/AcsfApi/AcsfClient.php#L16
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;
|
src/AcsfApi/AcsfClient.php#L31
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);
}
|
src/AcsfApi/AcsfClientService.php#L20
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
|
src/AcsfApi/AcsfConnector.php#L22
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
public function __construct(array $config, string $baseUri = null, string $urlAccessToken = null)
{
parent::__construct($config, $baseUri, $urlAccessToken);
- $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]);
+ $this->client = new GuzzleClient(['base_uri' => $this->getBaseUri()]);
}
/**
* @param array<string> $options
|
src/AcsfApi/AcsfConnector.php#L23
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
public function __construct(array $config, string $baseUri = null, string $urlAccessToken = null)
{
parent::__construct($config, $baseUri, $urlAccessToken);
- $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]);
+ $this->client = new GuzzleClient(['auth' => [$config['secret']], 'base_uri' => $this->getBaseUri()]);
}
/**
* @param array<string> $options
|
src/AcsfApi/AcsfConnector.php#L27
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
public function __construct(array $config, string $baseUri = null, string $urlAccessToken = null)
{
parent::__construct($config, $baseUri, $urlAccessToken);
- $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' => $this->getBaseUri()]);
+ $this->client = new GuzzleClient(['auth' => [$config['key'], $config['secret']], 'base_uri' > $this->getBaseUri()]);
}
/**
* @param array<string> $options
|
src/Application.php#L37
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
public function renderThrowable(Throwable $e, OutputInterface $output) : void
{
- parent::renderThrowable($e, $output);
+
if ($this->getHelpMessages()) {
$io = new SymfonyStyle(new ArrayInput([]), $output);
$outputStyle = new OutputFormatterStyle('white', 'blue');
|
src/Application.php#L39
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
public function renderThrowable(Throwable $e, OutputInterface $output) : void
{
parent::renderThrowable($e, $output);
- if ($this->getHelpMessages()) {
+ if (!$this->getHelpMessages()) {
$io = new SymfonyStyle(new ArrayInput([]), $output);
$outputStyle = new OutputFormatterStyle('white', 'blue');
$output->getFormatter()->setStyle('help', $outputStyle);
|
src/Application.php#L42
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
if ($this->getHelpMessages()) {
$io = new SymfonyStyle(new ArrayInput([]), $output);
$outputStyle = new OutputFormatterStyle('white', 'blue');
- $output->getFormatter()->setStyle('help', $outputStyle);
+
$io->block($this->getHelpMessages(), 'help', 'help', ' ', true, false);
}
}
}
|
This job failed
Loading