diff --git a/src/Queue/Consumers/StoreChannelPropertyState.php b/src/Queue/Consumers/StoreChannelPropertyState.php index 0a5524e..67b8b36 100644 --- a/src/Queue/Consumers/StoreChannelPropertyState.php +++ b/src/Queue/Consumers/StoreChannelPropertyState.php @@ -54,6 +54,7 @@ public function __construct( } /** + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws MetadataExceptions\InvalidArgument * @throws MetadataExceptions\InvalidState @@ -163,19 +164,19 @@ public function consume(Entities\Messages\Entity $entity): bool if ($property->getDataType()->equalsValue(MetadataTypes\DataType::DATA_TYPE_BUTTON)) { $this->channelPropertiesStateManager->setValue($property, Utils\ArrayHash::from([ - DevicesStates\Property::ACTUAL_VALUE_KEY => null, - DevicesStates\Property::EXPECTED_VALUE_KEY => null, - DevicesStates\Property::PENDING_KEY => false, - DevicesStates\Property::VALID_KEY => true, + DevicesStates\Property::ACTUAL_VALUE_FIELD => null, + DevicesStates\Property::EXPECTED_VALUE_FIELD => null, + DevicesStates\Property::PENDING_FIELD => false, + DevicesStates\Property::VALID_FIELD => true, ])); } else { $this->channelPropertiesStateManager->setValue($property, Utils\ArrayHash::from([ - DevicesStates\Property::ACTUAL_VALUE_KEY => DevicesUtilities\ValueHelper::transformValueFromDevice( + DevicesStates\Property::ACTUAL_VALUE_FIELD => DevicesUtilities\ValueHelper::transformValueFromDevice( $property->getDataType(), $property->getFormat(), $entity->getValue(), ), - DevicesStates\Property::VALID_KEY => true, + DevicesStates\Property::VALID_FIELD => true, ])); } diff --git a/src/Queue/Consumers/StoreDeviceConnectionState.php b/src/Queue/Consumers/StoreDeviceConnectionState.php index 49687a9..1493635 100644 --- a/src/Queue/Consumers/StoreDeviceConnectionState.php +++ b/src/Queue/Consumers/StoreDeviceConnectionState.php @@ -58,6 +58,7 @@ public function __construct( /** * @throws DBAL\Exception + * @throws DevicesExceptions\InvalidArgument * @throws DevicesExceptions\InvalidState * @throws DevicesExceptions\Runtime * @throws MetadataExceptions\InvalidArgument diff --git a/src/Queue/Consumers/WriteChannelPropertyState.php b/src/Queue/Consumers/WriteChannelPropertyState.php index b9d70ec..6bc6f62 100644 --- a/src/Queue/Consumers/WriteChannelPropertyState.php +++ b/src/Queue/Consumers/WriteChannelPropertyState.php @@ -490,7 +490,7 @@ function () use ($connector, $device, $property, $valueToWrite): void { $this->channelPropertiesStates->setValue( $property, Utils\ArrayHash::from([ - DevicesStates\Property::PENDING_KEY => $now->format(DateTimeInterface::ATOM), + DevicesStates\Property::PENDING_FIELD => $now->format(DateTimeInterface::ATOM), ]), ); } @@ -618,8 +618,8 @@ function (Throwable $ex) use ($connector, $device, $property): void { $this->channelPropertiesStates->setValue( $property, Utils\ArrayHash::from([ - DevicesStates\Property::EXPECTED_VALUE_KEY => null, - DevicesStates\Property::PENDING_KEY => false, + DevicesStates\Property::EXPECTED_VALUE_FIELD => null, + DevicesStates\Property::PENDING_FIELD => false, ]), );