Code Duplication    Length = 12-12 lines in 2 locations

src/DeliveryQueue/Amqp/AmqpMessageHandler.php 1 location

@@ 206-217 (lines=12) @@
203
            . ', ' . $this->getPayloadDescription($message);
204
    }
205
206
    private function getPayloadDescription(MessageInterface $message): string
207
    {
208
        if (is_object($message->getPayload())) {
209
            return get_class($message->getPayload());
210
        }
211
212
        if (is_array($message->getPayload())) {
213
            return 'array';
214
        }
215
216
        return (string) $message->getPayload();
217
    }
218
219
    /**
220
     * @param AMQPMessage $amqpMessage

src/DeliveryQueue/MessageHandler.php 1 location

@@ 144-155 (lines=12) @@
141
            . ', ' . $this->getPayloadDescription($message);
142
    }
143
144
    private function getPayloadDescription(MessageInterface $message): string
145
    {
146
        if (is_object($message->getPayload())) {
147
            return get_class($message->getPayload());
148
        }
149
150
        if (is_array($message->getPayload())) {
151
            return 'array';
152
        }
153
154
        return (string) $message->getPayload();
155
    }
156
157
    private function initiateHandling(MessageInterface $message): void
158
    {