Code Duplication    Length = 10-10 lines in 2 locations

src/DB.php 2 locations

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