Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 797-801 (lines=5) @@
794
795
        $result = Request::setWebhook($url, $data);
796
797
        if (!$result->isOk()) {
798
            throw new TelegramException(
799
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
800
            );
801
        }
802
803
        return $result;
804
    }
@@ 829-833 (lines=5) @@
826
    {
827
        $result = Request::deleteWebhook();
828
829
        if (!$result->isOk()) {
830
            throw new TelegramException(
831
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
832
            );
833
        }
834
835
        return $result;
836
    }