Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 746-750 (lines=5) @@
743
744
        $result = Request::setWebhook($url, $data);
745
746
        if (!$result->isOk()) {
747
            throw new TelegramException(
748
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
749
            );
750
        }
751
752
        return $result;
753
    }
@@ 778-782 (lines=5) @@
775
    {
776
        $result = Request::deleteWebhook();
777
778
        if (!$result->isOk()) {
779
            throw new TelegramException(
780
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
781
            );
782
        }
783
784
        return $result;
785
    }