Code Duplication    Length = 10-10 lines in 2 locations

src/DB.php 2 locations

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