Code Duplication    Length = 18-18 lines in 2 locations

src/DB.php 2 locations

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