Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

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