Code Duplication    Length = 18-18 lines in 2 locations

src/DB.php 2 locations

@@ 517-534 (lines=18) @@
514
                    $message_id
515
                );
516
            }
517
        } elseif ($update_type === 'edited_message') {
518
            $edited_message = $update->getEditedMessage();
519
520
            if (self::insertEditedMessageRequest($edited_message)) {
521
                $edited_message_local_id = self::$pdo->lastInsertId();
522
                $chat_id                 = $edited_message->getChat()->getId();
523
524
                return self::insertTelegramUpdate(
525
                    $update_id,
526
                    $chat_id,
527
                    null,
528
                    null,
529
                    null,
530
                    null,
531
                    $edited_message_local_id
532
                );
533
            }
534
        } elseif ($update_type === 'channel_post') {
535
            $channel_post = $update->getChannelPost();
536
537
            if (self::insertMessageRequest($channel_post)) {
@@ 547-564 (lines=18) @@
544
                    $message_id
545
                );
546
            }
547
        } elseif ($update_type === 'edited_channel_post') {
548
            $edited_channel_post = $update->getEditedChannelPost();
549
550
            if (self::insertEditedMessageRequest($edited_channel_post)) {
551
                $edited_channel_post_local_id = self::$pdo->lastInsertId();
552
                $chat_id                      = $edited_channel_post->getChat()->getId();
553
554
                return self::insertTelegramUpdate(
555
                    $update_id,
556
                    $chat_id,
557
                    null,
558
                    null,
559
                    null,
560
                    null,
561
                    $edited_channel_post_local_id
562
                );
563
            }
564
        } elseif ($update_type === 'inline_query') {
565
            $inline_query = $update->getInlineQuery();
566
567
            if (self::insertInlineQueryRequest($inline_query)) {