Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 748-752 (lines=5) @@
745
746
        $result = Request::setWebhook($url, $data);
747
748
        if (!$result->isOk()) {
749
            throw new TelegramException(
750
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
751
            );
752
        }
753
754
        return $result;
755
    }
@@ 780-784 (lines=5) @@
777
    {
778
        $result = Request::deleteWebhook();
779
780
        if (!$result->isOk()) {
781
            throw new TelegramException(
782
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
783
            );
784
        }
785
786
        return $result;
787
    }