Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 839-843 (lines=5) @@
836
837
        $result = Request::setWebhook($data);
838
839
        if (!$result->isOk()) {
840
            throw new TelegramException(
841
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
842
            );
843
        }
844
845
        return $result;
846
    }
@@ 858-862 (lines=5) @@
855
    {
856
        $result = Request::deleteWebhook();
857
858
        if (!$result->isOk()) {
859
            throw new TelegramException(
860
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
861
            );
862
        }
863
864
        return $result;
865
    }