Skip to content

Commit

Permalink
Use new element-plus theme (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 24, 2024
1 parent f05548e commit 48f2de6
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/Connector/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
use FastyBird\Connector\Virtual\Queue;
use FastyBird\Connector\Virtual\Writers;
use FastyBird\Library\Exchange\Exceptions as ExchangeExceptions;
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Library\Tools\Exceptions as ToolsExceptions;
use FastyBird\Module\Devices\Connectors as DevicesConnectors;
use FastyBird\Module\Devices\Documents as DevicesDocuments;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use Nette;
use React\EventLoop;
use React\Promise;
use TypeError;
use ValueError;
use function assert;
use function React\Async\async;

Expand Down Expand Up @@ -72,8 +76,19 @@ public function __construct(
/**
* @return Promise\PromiseInterface<bool>
*
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidArgument
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws ExchangeExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws MetadataExceptions\Mapping
* @throws TypeError
* @throws ToolsExceptions\InvalidArgument
* @throws ValueError
*/
public function execute(bool $standalone = true): Promise\PromiseInterface
{
Expand Down
30 changes: 28 additions & 2 deletions src/Devices/Devices.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
namespace FastyBird\Connector\Virtual\Devices;

use DateTimeInterface;
use Exception;
use FastyBird\Connector\Virtual;
use FastyBird\Connector\Virtual\Documents;
use FastyBird\Connector\Virtual\Drivers;
Expand Down Expand Up @@ -91,7 +90,18 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidArgument
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws MetadataExceptions\Mapping
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
public function start(): void
{
Expand Down Expand Up @@ -131,12 +141,14 @@ public function stop(): void
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exception
* @throws Exceptions\InvalidArgument
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws MetadataExceptions\Mapping
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
Expand Down Expand Up @@ -341,6 +353,20 @@ private function processDevice(Documents\Devices\Device $device): bool
return true;
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidArgument
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws MetadataExceptions\Mapping
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
private function registerLoopHandler(): void
{
$this->handlerTimer = $this->eventLoop->addTimer(
Expand Down
4 changes: 4 additions & 0 deletions src/Queue/Consumers/StoreChannelPropertyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
use FastyBird\Module\Devices\States as DevicesStates;
use Nette;
use Nette\Utils;
use TypeError;
use ValueError;
use function array_merge;
use function assert;
use function is_string;
Expand Down Expand Up @@ -72,6 +74,8 @@ public function __construct(
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
public function consume(Queue\Messages\Message $message): bool
{
Expand Down
4 changes: 4 additions & 0 deletions src/Queue/Consumers/StoreDevicePropertyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
use FastyBird\Module\Devices\States as DevicesStates;
use Nette;
use Nette\Utils;
use TypeError;
use ValueError;
use function array_merge;
use function assert;
use function is_string;
Expand Down Expand Up @@ -71,6 +73,8 @@ public function __construct(
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
public function consume(Queue\Messages\Message $message): bool
{
Expand Down
7 changes: 7 additions & 0 deletions src/Queue/Consumers/WriteChannelPropertyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use FastyBird\Library\Application\Helpers as ApplicationHelpers;
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Library\Tools\Exceptions as ToolsExceptions;
use FastyBird\Module\Devices\Documents as DevicesDocuments;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use FastyBird\Module\Devices\Models as DevicesModels;
Expand All @@ -34,6 +35,8 @@
use Nette;
use RuntimeException;
use Throwable;
use TypeError;
use ValueError;
use function React\Async\async;
use function React\Async\await;

Expand Down Expand Up @@ -71,8 +74,12 @@ public function __construct(
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws RuntimeException
* @throws ValueError
* @throws TypeError
* @throws ToolsExceptions\InvalidArgument
*/
public function consume(Queue\Messages\Message $message): bool
{
Expand Down
7 changes: 7 additions & 0 deletions src/Queue/Consumers/WriteDevicePropertyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use FastyBird\Library\Application\Helpers as ApplicationHelpers;
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Library\Tools\Exceptions as ToolsExceptions;
use FastyBird\Module\Devices\Documents as DevicesDocuments;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use FastyBird\Module\Devices\Models as DevicesModels;
Expand All @@ -34,6 +35,8 @@
use Nette;
use RuntimeException;
use Throwable;
use TypeError;
use ValueError;
use function React\Async\async;
use function React\Async\await;

Expand Down Expand Up @@ -70,8 +73,12 @@ public function __construct(
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws RuntimeException
* @throws ValueError
* @throws TypeError
* @throws ToolsExceptions\InvalidArgument
*/
public function consume(Queue\Messages\Message $message): bool
{
Expand Down
12 changes: 12 additions & 0 deletions src/Writers/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
use FastyBird\Library\Exchange\Consumers as ExchangeConsumers;
use FastyBird\Library\Exchange\Exceptions as ExchangeExceptions;
use FastyBird\Library\Metadata\Documents as MetadataDocuments;
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Library\Tools\Exceptions as ToolsExceptions;
use FastyBird\Module\Devices\Documents as DevicesDocuments;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use FastyBird\Module\Devices\Models as DevicesModels;
Expand Down Expand Up @@ -78,8 +80,18 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidState
*/

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws ExchangeExceptions\InvalidArgument
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
*/
public function connect(): void
{
Expand Down
15 changes: 15 additions & 0 deletions src/Writers/Periodic.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
*/
public function connect(): void
{
Expand Down Expand Up @@ -412,6 +418,15 @@ private function writeProperty(Documents\Devices\Device $device): bool
return false;
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
*/
private function registerLoopHandler(): void
{
$this->handlerTimer = $this->eventLoop->addTimer(
Expand Down
2 changes: 2 additions & 0 deletions tests/cases/unit/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ abstract class BaseTestCase extends TestCase

/**
* @throws ApplicationExceptions\InvalidArgument
* @throws ApplicationExceptions\InvalidState
* @throws Error
*/
protected function setUp(): void
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/cases/unit/DI/VirtualExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ final class VirtualExtensionTest extends Tests\Cases\Unit\BaseTestCase

/**
* @throws ApplicationExceptions\InvalidArgument
* @throws ApplicationExceptions\InvalidState
* @throws Nette\DI\MissingServiceException
* @throws Error
*/
Expand Down

0 comments on commit 48f2de6

Please sign in to comment.