Skip to content

Commit

Permalink
[devices-module] Properties - parent-child clearing (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 5, 2023
1 parent 8cbb805 commit 75a2447
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions src/API/ConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public function getLocalConnection(Entities\TuyaDevice $device): LocalApi
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -130,7 +129,6 @@ public function getCloudApiConnection(Entities\TuyaConnector $connector): OpenAp
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
4 changes: 0 additions & 4 deletions src/Clients/Cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\OpenApiCall
* @throws Exceptions\OpenApiError
* @throws MetadataExceptions\InvalidArgument
Expand Down Expand Up @@ -237,7 +236,6 @@ function (Entities\API\ReportDeviceState|Entities\API\ReportDeviceOnline $messag
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down Expand Up @@ -313,7 +311,6 @@ private function processDevice(Entities\TuyaDevice $device): bool
}

/**
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\OpenApiCall
* @throws Exceptions\OpenApiError
* @throws MetadataExceptions\InvalidArgument
Expand Down Expand Up @@ -408,7 +405,6 @@ private function readDeviceInformation(Entities\TuyaDevice $device): bool
}

/**
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\OpenApiCall
* @throws Exceptions\OpenApiError
* @throws MetadataExceptions\InvalidArgument
Expand Down
1 change: 0 additions & 1 deletion src/Clients/Discovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public function discover(): void
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
3 changes: 0 additions & 3 deletions src/Commands/Initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ private function askName(Style\SymfonyStyle $io, Entities\TuyaConnector|null $co
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -770,7 +769,6 @@ private function askAccessId(Style\SymfonyStyle $io, Entities\TuyaConnector|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down Expand Up @@ -888,7 +886,6 @@ private function askOpenApiEndpoint(Style\SymfonyStyle $io): Types\OpenApiEndpoi
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
1 change: 0 additions & 1 deletion src/Connector/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ public function discover(): void
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Entities/TuyaConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Module\Devices\Entities as DevicesEntities;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use function is_string;

/**
Expand All @@ -48,7 +47,6 @@ public function getSource(): MetadataTypes\ConnectorSource
}

/**
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
Expand All @@ -73,7 +71,6 @@ public function getClientMode(): Types\ClientMode
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -98,7 +95,6 @@ public function getOpenApiEndpoint(): Types\OpenApiEndpoint
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down Expand Up @@ -139,7 +135,6 @@ public function getOpenPulsarEndpoint(): Types\OpenPulsarEndpoint
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -164,7 +159,6 @@ public function getOpenPulsarTopic(): Types\OpenPulsarTopic
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -188,7 +182,6 @@ public function getAccessId(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -212,7 +205,6 @@ public function getAccessSecret(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
11 changes: 0 additions & 11 deletions src/Entities/TuyaDevice.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use FastyBird\Library\Metadata\Exceptions as MetadataExceptions;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Module\Devices\Entities as DevicesEntities;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
use function assert;
use function explode;
use function floatval;
Expand Down Expand Up @@ -57,7 +56,6 @@ public function getSource(): MetadataTypes\ConnectorSource
}

/**
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
Expand Down Expand Up @@ -97,7 +95,6 @@ public function getGateway(): self|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -121,7 +118,6 @@ public function getNodeId(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -145,7 +141,6 @@ public function getGatewayId(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -169,7 +164,6 @@ public function getIpAddress(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -193,7 +187,6 @@ public function getLocalKey(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -219,7 +212,6 @@ public function isEncrypted(): bool
/**
* @return array<string>
*
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -243,7 +235,6 @@ public function getExcludedDps(): array
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -267,7 +258,6 @@ public function getModel(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand All @@ -291,7 +281,6 @@ public function getMacAddress(): string|null
}

/**
* @throws DevicesExceptions\InvalidState
* @throws MetadataExceptions\InvalidArgument
* @throws MetadataExceptions\InvalidState
*/
Expand Down
6 changes: 0 additions & 6 deletions src/Queue/Consumers/DeviceProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ private function setDeviceProperty(
string $identifier,
string|null $name = null,
array|string|null $format = null,
bool $settable = false,
bool $queryable = false,
): void
{
$findDevicePropertyQuery = new DevicesQueries\FindDeviceProperties();
Expand Down Expand Up @@ -147,8 +145,6 @@ function () use ($property): void {
'identifier' => $identifier,
'name' => $name,
'dataType' => $dataType,
'settable' => $settable,
'queryable' => $queryable,
'value' => $value,
'format' => $format,
]),
Expand Down Expand Up @@ -176,8 +172,6 @@ function () use ($property): void {
$property,
Utils\ArrayHash::from([
'dataType' => $dataType,
'settable' => $settable,
'queryable' => $queryable,
'value' => $value,
'format' => $format,
]),
Expand Down

0 comments on commit 75a2447

Please sign in to comment.