Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 800-804 (lines=5) @@
797
798
        $result = Request::setWebhook($url, $data);
799
800
        if (!$result->isOk()) {
801
            throw new TelegramException(
802
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
803
            );
804
        }
805
806
        return $result;
807
    }
@@ 832-836 (lines=5) @@
829
    {
830
        $result = Request::deleteWebhook();
831
832
        if (!$result->isOk()) {
833
            throw new TelegramException(
834
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
835
            );
836
        }
837
838
        return $result;
839
    }