Skip to content

Refactoring processing of virtual connector (#184) #280

Refactoring processing of virtual connector (#184)

Refactoring processing of virtual connector (#184) #280

Triggered via push November 22, 2023 11:40
Status Success
Total duration 11m 13s
Artifacts

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
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Test for mutants (8.2, ubuntu-latest): src/Commands/Devices.php#L108
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public const NAME = 'fb:homekit-connector:devices'; public function __construct(private readonly Helpers\Loader $loader, private readonly HomeKit\Logger $logger, private readonly DevicesModels\Entities\Connectors\ConnectorsRepository $connectorsRepository, private readonly DevicesModels\Entities\Devices\DevicesRepository $devicesRepository, private readonly DevicesModels\Entities\Devices\DevicesManager $devicesManager, private readonly DevicesModels\Entities\Devices\Properties\PropertiesRepository $devicesPropertiesRepository, private readonly DevicesModels\Entities\Devices\Properties\PropertiesManager $devicesPropertiesManager, private readonly DevicesModels\Entities\Channels\ChannelsRepository $channelsRepository, private readonly DevicesModels\Entities\Channels\ChannelsManager $channelsManager, private readonly DevicesModels\Entities\Channels\Properties\PropertiesRepository $channelsPropertiesRepository, private readonly DevicesModels\Entities\Channels\Properties\PropertiesManager $channelsPropertiesManager, private readonly Persistence\ManagerRegistry $managerRegistry, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Devices.php#L116
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('HomeKit devices management'); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Execute.php#L62
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public const NAME = 'fb:homekit-connector:execute'; public function __construct(private readonly DevicesModels\Entities\Connectors\ConnectorsRepository $connectorsRepository, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Execute.php#L70
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('HomeKit connector service')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Run devices module connector', true)])); + } /** * @throws Console\Exception\ExceptionInterface
Test for mutants (8.2, ubuntu-latest): src/Commands/Execute.php#L74
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('HomeKit connector service')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Run devices module connector', true)])); + $this->setName(self::NAME)->setDescription('HomeKit connector service')->setDefinition(new Input\InputDefinition([])); } /** * @throws Console\Exception\ExceptionInterface
Test for mutants (8.2, ubuntu-latest): src/Commands/Execute.php#L80
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('HomeKit connector service')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Run devices module connector', true)])); + $this->setName(self::NAME)->setDescription('HomeKit connector service')->setDefinition(new Input\InputDefinition([new Input\InputOption('connector', 'c', Input\InputOption::VALUE_OPTIONAL, 'Run devices module connector', false)])); } /** * @throws Console\Exception\ExceptionInterface
Test for mutants (8.2, ubuntu-latest): src/Commands/Initialize.php#L74
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public const NAME = 'fb:homekit-connector:initialize'; public function __construct(private readonly HomeKit\Logger $logger, private readonly DevicesModels\Entities\Connectors\ConnectorsRepository $connectorsRepository, private readonly DevicesModels\Entities\Connectors\ConnectorsManager $connectorsManager, private readonly DevicesModels\Entities\Devices\DevicesRepository $devicesRepository, private readonly DevicesModels\Entities\Connectors\Properties\PropertiesRepository $propertiesRepository, private readonly DevicesModels\Entities\Connectors\Properties\PropertiesManager $propertiesManager, private readonly Persistence\ManagerRegistry $managerRegistry, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Initialize.php#L82
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('HomeKit connector initialization'); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Controllers/AccessoriesController.php#L70
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ public function index(Message\ServerRequestInterface $request, Message\ResponseInterface $response) : Message\ResponseInterface { - $this->logger->debug('Requested list of all registered accessories', ['source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_HOMEKIT, 'type' => 'accessories-controller', 'request' => ['address' => $request->getServerParams()['REMOTE_ADDR'], 'path' => $request->getUri()->getPath()]]); + $connectorId = strval($request->getAttribute(Servers\Http::REQUEST_ATTRIBUTE_CONNECTOR)); if (!Uuid\Uuid::isValid($connectorId)) { throw new Exceptions\InvalidState('Connector id could not be determined');
Test for mutants (8.2, ubuntu-latest): src/Controllers/AccessoriesController.php#L72
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ */ public function index(Message\ServerRequestInterface $request, Message\ResponseInterface $response) : Message\ResponseInterface { - $this->logger->debug('Requested list of all registered accessories', ['source' => MetadataTypes\ConnectorSource::SOURCE_CONNECTOR_HOMEKIT, 'type' => 'accessories-controller', 'request' => ['address' => $request->getServerParams()['REMOTE_ADDR'], 'path' => $request->getUri()->getPath()]]); + $this->logger->debug('Requested list of all registered accessories', ['type' => 'accessories-controller', 'request' => ['address' => $request->getServerParams()['REMOTE_ADDR'], 'path' => $request->getUri()->getPath()]]); $connectorId = strval($request->getAttribute(Servers\Http::REQUEST_ATTRIBUTE_CONNECTOR)); if (!Uuid\Uuid::isValid($connectorId)) { throw new Exceptions\InvalidState('Connector id could not be determined');