Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 790-794 (lines=5) @@
787
788
        $result = Request::setWebhook($url, $data);
789
790
        if (!$result->isOk()) {
791
            throw new TelegramException(
792
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
793
            );
794
        }
795
796
        return $result;
797
    }
@@ 822-826 (lines=5) @@
819
    {
820
        $result = Request::deleteWebhook();
821
822
        if (!$result->isOk()) {
823
            throw new TelegramException(
824
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
825
            );
826
        }
827
828
        return $result;
829
    }