[fb-mqtt-connector] Refactoring connector to latest dev spec (#207) #83
ci.yaml
on: push
Matrix: Code quality assurance
Matrix: Code static analysis
Matrix: Code linting
Matrix: Test for mutants
Matrix: Code tests
Matrix: Code tests with code coverage
Annotations
8 warnings
Test for mutants (8.2, ubuntu-latest):
src/Connections/Connection.php#L35
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
final class Connection
{
use Nette\SmartObject;
- public function __construct(private readonly string $host = '127.0.0.1', private readonly int $port = 5672, private readonly string $vhost = '/', private readonly string $username = 'guest', private readonly string $password = 'guest')
+ public function __construct(private readonly string $host = '127.0.0.1', private readonly int $port = 5671, private readonly string $vhost = '/', private readonly string $username = 'guest', private readonly string $password = 'guest')
{
}
public function getHost() : string
|
Test for mutants (8.2, ubuntu-latest):
src/Connections/Connection.php#L35
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
final class Connection
{
use Nette\SmartObject;
- public function __construct(private readonly string $host = '127.0.0.1', private readonly int $port = 5672, private readonly string $vhost = '/', private readonly string $username = 'guest', private readonly string $password = 'guest')
+ public function __construct(private readonly string $host = '127.0.0.1', private readonly int $port = 5673, private readonly string $vhost = '/', private readonly string $username = 'guest', private readonly string $password = 'guest')
{
}
public function getHost() : string
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L63
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
}
public function getConfigSchema() : Schema\Schema
{
- return Schema\Expect::structure(['client' => Schema\Expect::structure(['host' => Schema\Expect::string()->default('127.0.0.1'), 'port' => Schema\Expect::int(5672), 'vhost' => Schema\Expect::string('/'), 'username' => Schema\Expect::string('guest'), 'password' => Schema\Expect::string('guest')]), 'exchange' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(self::EXCHANGE_NAME)]), 'queue' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(null)])]);
+ return Schema\Expect::structure(['client' => Schema\Expect::structure(['host' => Schema\Expect::string()->default('127.0.0.1'), 'port' => Schema\Expect::int(5671), 'vhost' => Schema\Expect::string('/'), 'username' => Schema\Expect::string('guest'), 'password' => Schema\Expect::string('guest')]), 'exchange' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(self::EXCHANGE_NAME)]), 'queue' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(null)])]);
}
public function loadConfiguration() : void
{
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L63
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
}
public function getConfigSchema() : Schema\Schema
{
- return Schema\Expect::structure(['client' => Schema\Expect::structure(['host' => Schema\Expect::string()->default('127.0.0.1'), 'port' => Schema\Expect::int(5672), 'vhost' => Schema\Expect::string('/'), 'username' => Schema\Expect::string('guest'), 'password' => Schema\Expect::string('guest')]), 'exchange' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(self::EXCHANGE_NAME)]), 'queue' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(null)])]);
+ return Schema\Expect::structure(['client' => Schema\Expect::structure(['host' => Schema\Expect::string()->default('127.0.0.1'), 'port' => Schema\Expect::int(5673), 'vhost' => Schema\Expect::string('/'), 'username' => Schema\Expect::string('guest'), 'password' => Schema\Expect::string('guest')]), 'exchange' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(self::EXCHANGE_NAME)]), 'queue' => Schema\Expect::structure(['name' => Schema\Expect::string()->default(null)])]);
}
public function loadConfiguration() : void
{
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L94
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
$configuration = $this->getConfig();
assert($configuration instanceof stdClass);
$publisher = $builder->addDefinition($this->prefix('publisher'), new DI\Definitions\ServiceDefinition())->setType(Publishers\Publisher::class)->setArguments(['exchangeName' => $configuration->exchange->name]);
- $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' => $configuration->client->username, 'password' => $configuration->client->password]);
+ $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' > $configuration->client->vhost, 'username' => $configuration->client->username, 'password' => $configuration->client->password]);
$builder->addDefinition($this->prefix('channels.sync'), new DI\Definitions\ServiceDefinition())->setType(Channels\Channel::class);
$builder->addDefinition($this->prefix('channels.async.factory'), new DI\Definitions\ServiceDefinition())->setType(Channels\Factory::class)->setArguments(['exchangeName' => $configuration->exchange->name, 'queueName' => $configuration->queue->name]);
$builder->addDefinition($this->prefix('handlers.message'), new DI\Definitions\ServiceDefinition())->setType(Handlers\Message::class);
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L95
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
$configuration = $this->getConfig();
assert($configuration instanceof stdClass);
$publisher = $builder->addDefinition($this->prefix('publisher'), new DI\Definitions\ServiceDefinition())->setType(Publishers\Publisher::class)->setArguments(['exchangeName' => $configuration->exchange->name]);
- $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' => $configuration->client->username, 'password' => $configuration->client->password]);
+ $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' > $configuration->client->username, 'password' => $configuration->client->password]);
$builder->addDefinition($this->prefix('channels.sync'), new DI\Definitions\ServiceDefinition())->setType(Channels\Channel::class);
$builder->addDefinition($this->prefix('channels.async.factory'), new DI\Definitions\ServiceDefinition())->setType(Channels\Factory::class)->setArguments(['exchangeName' => $configuration->exchange->name, 'queueName' => $configuration->queue->name]);
$builder->addDefinition($this->prefix('handlers.message'), new DI\Definitions\ServiceDefinition())->setType(Handlers\Message::class);
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L96
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
$configuration = $this->getConfig();
assert($configuration instanceof stdClass);
$publisher = $builder->addDefinition($this->prefix('publisher'), new DI\Definitions\ServiceDefinition())->setType(Publishers\Publisher::class)->setArguments(['exchangeName' => $configuration->exchange->name]);
- $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' => $configuration->client->username, 'password' => $configuration->client->password]);
+ $builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' => $configuration->client->username, 'password' > $configuration->client->password]);
$builder->addDefinition($this->prefix('channels.sync'), new DI\Definitions\ServiceDefinition())->setType(Channels\Channel::class);
$builder->addDefinition($this->prefix('channels.async.factory'), new DI\Definitions\ServiceDefinition())->setType(Channels\Factory::class)->setArguments(['exchangeName' => $configuration->exchange->name, 'queueName' => $configuration->queue->name]);
$builder->addDefinition($this->prefix('handlers.message'), new DI\Definitions\ServiceDefinition())->setType(Handlers\Message::class);
|
Test for mutants (8.2, ubuntu-latest):
src/DI/RabbitMqExtension.php#L106
Escaped Mutant for Mutator "ArrayItem":
--- Original
+++ New
@@ @@
$publisher = $builder->addDefinition($this->prefix('publisher'), new DI\Definitions\ServiceDefinition())->setType(Publishers\Publisher::class)->setArguments(['exchangeName' => $configuration->exchange->name]);
$builder->addDefinition($this->prefix('rabbit.connection'), new DI\Definitions\ServiceDefinition())->setType(Connections\Connection::class)->setArguments(['host' => $configuration->client->host, 'port' => $configuration->client->port, 'vhost' => $configuration->client->vhost, 'username' => $configuration->client->username, 'password' => $configuration->client->password]);
$builder->addDefinition($this->prefix('channels.sync'), new DI\Definitions\ServiceDefinition())->setType(Channels\Channel::class);
- $builder->addDefinition($this->prefix('channels.async.factory'), new DI\Definitions\ServiceDefinition())->setType(Channels\Factory::class)->setArguments(['exchangeName' => $configuration->exchange->name, 'queueName' => $configuration->queue->name]);
+ $builder->addDefinition($this->prefix('channels.async.factory'), new DI\Definitions\ServiceDefinition())->setType(Channels\Factory::class)->setArguments(['exchangeName' => $configuration->exchange->name, 'queueName' > $configuration->queue->name]);
$builder->addDefinition($this->prefix('handlers.message'), new DI\Definitions\ServiceDefinition())->setType(Handlers\Message::class);
$builder->addDefinition($this->prefix('utilities.identifier'), new DI\Definitions\ServiceDefinition())->setType(Utilities\IdentifierGenerator::class);
$builder->addDefinition($this->prefix('subscribers.channel'), new DI\Definitions\ServiceDefinition())->setType(Subscribers\Channel::class)->setArguments(['publisher' => $publisher]);
}
}
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
Logs - Mutations
Expired
|
114 KB |
|