From 5dd848cb022f3ba4c4c9fbc35a7363bc725421d7 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 14 Jan 2024 00:08:05 +0700 Subject: [PATCH] Remove redundant class --- src/Exception/NoKeyInPayloadException.php | 56 ----------------------- src/Message/MessageSerializer.php | 2 - 2 files changed, 58 deletions(-) delete mode 100644 src/Exception/NoKeyInPayloadException.php diff --git a/src/Exception/NoKeyInPayloadException.php b/src/Exception/NoKeyInPayloadException.php deleted file mode 100644 index b8dda3bb..00000000 --- a/src/Exception/NoKeyInPayloadException.php +++ /dev/null @@ -1,56 +0,0 @@ -expectedKey); - } - - /** - * @return string - * - * @infection-ignore-all - */ - public function getSolution(): ?string - { - return sprintf( - "We have successfully unserialized a message, but there was no expected key \"%s\". - There are the following keys in the message: %s. - You might want to change message's structure, or make your own implementation of %s, - which won't rely on this key in the message.", - $this->expectedKey, - implode('", "', array_keys($this->payload)), - MessageSerializerInterface::class - ); - } -} diff --git a/src/Message/MessageSerializer.php b/src/Message/MessageSerializer.php index c8ba276c..21bb481b 100644 --- a/src/Message/MessageSerializer.php +++ b/src/Message/MessageSerializer.php @@ -6,7 +6,6 @@ use InvalidArgumentException; use JsonException; -use Yiisoft\Queue\Exception\NoKeyInPayloadException; final class MessageSerializer implements MessageSerializerInterface { @@ -26,7 +25,6 @@ public function serialize(MessageInterface $message): string /** * @throws JsonException - * @throws NoKeyInPayloadException * @throws InvalidArgumentException */ public function unserialize(string $value): MessageInterface