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
    }
@@ 811-815 (lines=5) @@
808
    {
809
        $result = Request::deleteWebhook();
810
811
        if (!$result->isOk()) {
812
            throw new TelegramException(
813
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
814
            );
815
        }
816
817
        return $result;
818
    }