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 c9999ed commit 88392b5
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Clients/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public function __construct(
{
}

/**
* @throws RuntimeException
*/
public function discover(): void
{
$this->logger->debug(
Expand Down Expand Up @@ -156,7 +159,7 @@ public function discover(): void
$data .= "MX: 1\r\n";
$data .= "\r\n";

$this->sender->send($data, sprintf('%s:%d', self::MCAST_HOST, self::MCAST_PORT));
$this->sender?->send($data, sprintf('%s:%d', self::MCAST_HOST, self::MCAST_PORT));
}

public function disconnect(): void
Expand Down
17 changes: 17 additions & 0 deletions src/Clients/Television.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,15 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidArgument
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\Mapping
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
Expand Down Expand Up @@ -650,6 +654,19 @@ private function getDeviceClient(Documents\Devices\Device $device): API\Televisi
: null;
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidArgument
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\Mapping
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
* @throws TypeError
* @throws ValueError
*/
private function registerLoopHandler(): void
{
$this->handlerTimer = $this->eventLoop->addTimer(
Expand Down
12 changes: 12 additions & 0 deletions src/Connector/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
use FastyBird\Connector\Viera;
use FastyBird\Connector\Viera\Clients;
use FastyBird\Connector\Viera\Documents;
use FastyBird\Connector\Viera\Exceptions;
use FastyBird\Connector\Viera\Queue;
use FastyBird\Connector\Viera\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 RuntimeException;
use function assert;
use function React\Async\async;

Expand Down Expand Up @@ -72,8 +76,14 @@ public function __construct(
/**
* @return Promise\PromiseInterface<bool>
*
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws ExchangeExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws MetadataExceptions\MalformedInput
* @throws ToolsExceptions\InvalidArgument
*/
public function execute(bool $standalone = true): Promise\PromiseInterface
{
Expand Down Expand Up @@ -131,6 +141,8 @@ public function execute(bool $standalone = true): Promise\PromiseInterface

/**
* @return Promise\PromiseInterface<bool>
*
* @throws RuntimeException
*/
public function discover(): Promise\PromiseInterface
{
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 Nette;
use Nette\Utils;
use Ramsey\Uuid;
use TypeError;
use ValueError;
use function array_merge;
use function React\Async\await;

Expand Down Expand Up @@ -65,6 +67,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
2 changes: 2 additions & 0 deletions src/Subscribers/Properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function postPersist(Persistence\Event\LifecycleEventArgs $eventArgs): vo
* @throws Exceptions\InvalidArgument
* @throws Exceptions\InvalidArgument
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws TypeError
* @throws ValueError
*/
Expand Down Expand Up @@ -282,6 +283,7 @@ private function processChannelProperty(
* @throws DoctrineCrud\Exceptions\InvalidArgumentException
* @throws Exceptions\InvalidArgument
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
* @throws TypeError
* @throws ValueError
*/
Expand Down
8 changes: 8 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 @@ -73,8 +75,14 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws ExchangeExceptions\InvalidArgument
* @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 @@ -88,7 +88,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 @@ -266,6 +272,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/VieraExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ final class VieraExtensionTest extends Tests\Cases\Unit\BaseTestCase

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

0 comments on commit 88392b5

Please sign in to comment.