Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 804-808 (lines=5) @@
801
802
        $result = Request::setWebhook($data);
803
804
        if (!$result->isOk()) {
805
            throw new TelegramException(
806
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
807
            );
808
        }
809
810
        return $result;
811
    }
@@ 823-827 (lines=5) @@
820
    {
821
        $result = Request::deleteWebhook();
822
823
        if (!$result->isOk()) {
824
            throw new TelegramException(
825
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
826
            );
827
        }
828
829
        return $result;
830
    }