diff --git a/src/Commands/Install.php b/src/Commands/Install.php index 9a2be8d..f7269ae 100644 --- a/src/Commands/Install.php +++ b/src/Commands/Install.php @@ -23,6 +23,7 @@ use FastyBird\Addon\VirtualThermostat\Queries; use FastyBird\Addon\VirtualThermostat\Types; use FastyBird\Connector\Virtual\Entities as VirtualEntities; +use FastyBird\Connector\Virtual\Exceptions as VirtualExceptions; use FastyBird\Connector\Virtual\Queries as VirtualQueries; use FastyBird\Connector\Virtual\Types as VirtualTypes; use FastyBird\Library\Application\Exceptions as ApplicationExceptions; @@ -115,15 +116,22 @@ protected function configure(): void } /** + * @throws ApplicationExceptions\InvalidState * @throws Console\Exception\ExceptionInterface * @throws Console\Exception\InvalidArgumentException * @throws DBAL\Exception + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception + * @throws Exceptions\InvalidArgument + * @throws Exceptions\InvalidState * @throws Exceptions\Runtime + * @throws MetadataExceptions\InvalidArgument + * @throws MetadataExceptions\InvalidState * @throws ToolsExceptions\InvalidArgument * @throws TypeError * @throws ValueError + * @throws VirtualExceptions\InvalidArgument */ protected function execute(Input\InputInterface $input, Output\OutputInterface $output): int { @@ -139,12 +147,13 @@ protected function execute(Input\InputInterface $input, Output\OutputInterface $ } /** - * @throws DBAL\Exception + * @throws ApplicationExceptions\InvalidState + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception - * @throws Exceptions\Runtime - * @throws Exceptions\InvalidArgument * @throws MetadataExceptions\InvalidArgument + * @throws MetadataExceptions\InvalidState + * @throws ToolsExceptions\InvalidArgument * @throws TypeError * @throws ValueError */ @@ -1028,14 +1037,18 @@ private function createDevice(Style\SymfonyStyle $io): void } /** - * @throws DBAL\Exception + * @throws ApplicationExceptions\InvalidState + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception - * @throws Exceptions\Runtime * @throws Exceptions\InvalidArgument + * @throws Exceptions\InvalidState * @throws MetadataExceptions\InvalidArgument + * @throws MetadataExceptions\InvalidState + * @throws ToolsExceptions\InvalidArgument * @throws TypeError * @throws ValueError + * @throws VirtualExceptions\InvalidArgument */ private function editDevice(Style\SymfonyStyle $io): void { @@ -1691,6 +1704,7 @@ private function deleteDevice(Style\SymfonyStyle $io): void * @throws ApplicationExceptions\InvalidState * @throws Console\Exception\ExceptionInterface * @throws DBAL\Exception + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception * @throws Exceptions\InvalidArgument @@ -1776,10 +1790,11 @@ private function listDevices(Style\SymfonyStyle $io): void /** * @throws ApplicationExceptions\InvalidState - * @throws DBAL\Exception * @throws DevicesExceptions\InvalidState - * @throws Exceptions\Runtime * @throws Exception + * @throws Exceptions\InvalidArgument + * @throws Exceptions\InvalidState + * @throws MetadataExceptions\InvalidArgument * @throws TypeError * @throws ValueError */ @@ -1872,8 +1887,12 @@ private function createActor(Style\SymfonyStyle $io, Entities\Devices\Device $de } /** + * @throws ApplicationExceptions\InvalidState * @throws DevicesExceptions\InvalidState * @throws Exception + * @throws Exceptions\InvalidArgument + * @throws Exceptions\InvalidState + * @throws MetadataExceptions\InvalidArgument * @throws TypeError * @throws ValueError */ @@ -2091,10 +2110,9 @@ private function deleteActor(Style\SymfonyStyle $io, Entities\Devices\Device $de /** * @throws ApplicationExceptions\InvalidState - * @throws DBAL\Exception * @throws DevicesExceptions\InvalidState - * @throws Exceptions\Runtime * @throws Exception + * @throws Exceptions\InvalidArgument */ private function createSensor(Style\SymfonyStyle $io, Entities\Devices\Device $device): void { @@ -2243,6 +2261,7 @@ private function createSensor(Style\SymfonyStyle $io, Entities\Devices\Device $d * @throws ApplicationExceptions\InvalidState * @throws DevicesExceptions\InvalidState * @throws Exception + * @throws Exceptions\InvalidArgument */ private function editSensor(Style\SymfonyStyle $io, Entities\Devices\Device $device): void { @@ -3252,6 +3271,7 @@ private function askActorName( * @param array $ignoredIds * @param array|null $allowedDataTypes * + * @throws ApplicationExceptions\InvalidState * @throws DevicesExceptions\InvalidState * @throws Exception */ @@ -3373,6 +3393,7 @@ private function askSensorName( * @param array $ignoredIds * @param array|null $allowedDataTypes * + * @throws ApplicationExceptions\InvalidState * @throws DevicesExceptions\InvalidState * @throws Exception */ @@ -3639,6 +3660,7 @@ private function askCoolingThresholdTemperature( * @param array|null $allowedDataTypes * @param class-string $onlyType * + * @throws ApplicationExceptions\InvalidState * @throws DevicesExceptions\InvalidState * @throws Exception */ @@ -4117,6 +4139,7 @@ function (string|null $answer) use ($properties): DevicesEntities\Channels\Prope * @throws ApplicationExceptions\InvalidState * @throws Console\Exception\ExceptionInterface * @throws DBAL\Exception + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception * @throws Exceptions\InvalidArgument @@ -4127,6 +4150,7 @@ function (string|null $answer) use ($properties): DevicesEntities\Channels\Prope * @throws ToolsExceptions\InvalidArgument * @throws TypeError * @throws ValueError + * @throws VirtualExceptions\InvalidArgument */ private function askInstallAction(Style\SymfonyStyle $io): void { @@ -4210,12 +4234,15 @@ private function askInstallAction(Style\SymfonyStyle $io): void } /** + * @throws ApplicationExceptions\InvalidState * @throws Console\Exception\InvalidArgumentException * @throws Console\Exception\ExceptionInterface * @throws DBAL\Exception * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws Exception + * @throws Exceptions\InvalidArgument + * @throws Exceptions\InvalidState * @throws Exceptions\Runtime * @throws MetadataExceptions\InvalidArgument * @throws MetadataExceptions\InvalidState diff --git a/tests/cases/unit/BaseTestCase.php b/tests/cases/unit/BaseTestCase.php index eb12258..7ba63b2 100644 --- a/tests/cases/unit/BaseTestCase.php +++ b/tests/cases/unit/BaseTestCase.php @@ -22,6 +22,7 @@ abstract class BaseTestCase extends TestCase /** * @throws ApplicationExceptions\InvalidArgument + * @throws ApplicationExceptions\InvalidState * @throws Error */ protected function setUp(): void @@ -33,6 +34,7 @@ protected function setUp(): void /** * @throws ApplicationExceptions\InvalidArgument + * @throws ApplicationExceptions\InvalidState * @throws Error */ protected function createContainer(string|null $additionalConfig = null): Nette\DI\Container diff --git a/tests/cases/unit/DI/VirtualThermostatExtensionTest.php b/tests/cases/unit/DI/VirtualThermostatExtensionTest.php index 20fd5bb..f5b1243 100644 --- a/tests/cases/unit/DI/VirtualThermostatExtensionTest.php +++ b/tests/cases/unit/DI/VirtualThermostatExtensionTest.php @@ -17,6 +17,7 @@ final class VirtualThermostatExtensionTest extends Tests\Cases\Unit\BaseTestCase /** * @throws ApplicationExceptions\InvalidArgument + * @throws ApplicationExceptions\InvalidState * @throws Nette\DI\MissingServiceException * @throws Error */