release: prepare version 3.1.0 #335
Annotations
9 warnings
Code Quality:
src/Client/RestClient.php#L48
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
public function __construct(private readonly ClientConfiguration $configuration)
{
$stack = HandlerStack::create();
- $stack->setHandler(new CurlHandler());
+
$stack->push((new UserAgentMiddleware())($this->configuration->getUserAgentAddition()));
$stack->push((new AuthorisationMiddleware())($this->authorisationToken));
$options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' => $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => true]];
|
Code Quality:
src/Client/RestClient.php#L54
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
$stack->setHandler(new CurlHandler());
$stack->push((new UserAgentMiddleware())($this->configuration->getUserAgentAddition()));
$stack->push((new AuthorisationMiddleware())($this->authorisationToken));
- $options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' => $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => true]];
+ $options = [...$this->configuration->getClientOptions()->toArray(), ...['handler' => $stack, 'synchronous' => true]];
$this->client = new Client($options);
$this->routeContentTypeMapper = new RouteContentTypeMapper();
}
|
Code Quality:
src/Client/RestClient.php#L55
Escaped Mutant for Mutator "ArrayItem":
@@ @@
$stack->setHandler(new CurlHandler());
$stack->push((new UserAgentMiddleware())($this->configuration->getUserAgentAddition()));
$stack->push((new AuthorisationMiddleware())($this->authorisationToken));
- $options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' => $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => true]];
+ $options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' > $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => true]];
$this->client = new Client($options);
$this->routeContentTypeMapper = new RouteContentTypeMapper();
}
|
Code Quality:
src/Client/RestClient.php#L57
Escaped Mutant for Mutator "TrueValue":
@@ @@
$stack->setHandler(new CurlHandler());
$stack->push((new UserAgentMiddleware())($this->configuration->getUserAgentAddition()));
$stack->push((new AuthorisationMiddleware())($this->authorisationToken));
- $options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' => $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => true]];
+ $options = [...$this->configuration->getClientOptions()->toArray(), ...['base_uri' => $configuration->getJobRouterSystem()->getBaseUrl(), 'handler' => $stack, 'synchronous' => false]];
$this->client = new Client($options);
$this->routeContentTypeMapper = new RouteContentTypeMapper();
}
|
Code Quality:
src/Client/RestClient.php#L134
Escaped Mutant for Mutator "UnwrapLtrim":
@@ @@
if (!\is_array($data)) {
throw new RestClientException(\sprintf('data must be an array, "%s" given', \get_debug_type($data)), 1578233543);
}
- $resource = \ltrim($resource, '/');
+ $resource = $resource;
$contentType = $this->routeContentTypeMapper->getRequestContentTypeForRoute($method, $resource);
try {
if ($contentType === 'multipart/form-data') {
|
Code Quality:
src/Configuration/ClientOptions.php#L23
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*/
final class ClientOptions
{
- public function __construct(private readonly bool $allowRedirects = false, private readonly int $maxRedirects = 5, private readonly int|float $timeout = 0, private readonly bool $verify = true, private readonly ?string $proxy = null)
+ public function __construct(private readonly bool $allowRedirects = false, private readonly int $maxRedirects = 4, private readonly int|float $timeout = 0, private readonly bool $verify = true, private readonly ?string $proxy = null)
{
}
/**
|
Code Quality:
src/Configuration/ClientOptions.php#L23
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
*/
final class ClientOptions
{
- public function __construct(private readonly bool $allowRedirects = false, private readonly int $maxRedirects = 5, private readonly int|float $timeout = 0, private readonly bool $verify = true, private readonly ?string $proxy = null)
+ public function __construct(private readonly bool $allowRedirects = false, private readonly int $maxRedirects = 6, private readonly int|float $timeout = 0, private readonly bool $verify = true, private readonly ?string $proxy = null)
{
}
/**
|
Code Quality:
src/Mapper/MultipartFormDataMapper.php#L62
Escaped Mutant for Mutator "UnwrapArrayValues":
@@ @@
}
// @phpstan-ignore-next-line Use value object over return of values
return ['name' => $name, 'contents' => (string) $value];
- }, \array_keys($data), \array_values($data));
+ }, \array_keys($data), $data);
}
}
|
Code Quality:
src/Middleware/UserAgentMiddleware.php#L40
Escaped Mutant for Mutator "UnwrapRtrim":
@@ @@
}
private function compileUserAgent(string $userAgentAddition): string
{
- return \rtrim(\sprintf(self::USER_AGENT_TEMPLATE, (new Version())->getVersion(), $userAgentAddition));
+ return \sprintf(self::USER_AGENT_TEMPLATE, (new Version())->getVersion(), $userAgentAddition);
}
}
|