Code Duplication    Length = 10-10 lines in 2 locations

src/DB.php 2 locations

@@ 508-517 (lines=10) @@
505
        if ($update_type === 'message') {
506
            $message = $update->getMessage();
507
508
            if (self::insertMessageRequest($message)) {
509
                $message_id = $message->getMessageId();
510
                $chat_id    = $message->getChat()->getId();
511
512
                return self::insertTelegramUpdate(
513
                    $update_id,
514
                    $chat_id,
515
                    $message_id
516
                );
517
            }
518
        } elseif ($update_type === 'edited_message') {
519
            $edited_message = $update->getEditedMessage();
520
@@ 538-547 (lines=10) @@
535
        } elseif ($update_type === 'channel_post') {
536
            $channel_post = $update->getChannelPost();
537
538
            if (self::insertMessageRequest($channel_post)) {
539
                $message_id = $channel_post->getMessageId();
540
                $chat_id    = $channel_post->getChat()->getId();
541
542
                return self::insertTelegramUpdate(
543
                    $update_id,
544
                    $chat_id,
545
                    $message_id
546
                );
547
            }
548
        } elseif ($update_type === 'edited_channel_post') {
549
            $edited_channel_post = $update->getEditedChannelPost();
550