Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 823-827 (lines=5) @@
820
821
        $result = Request::setWebhook($data);
822
823
        if (!$result->isOk()) {
824
            throw new TelegramException(
825
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
826
            );
827
        }
828
829
        return $result;
830
    }
@@ 842-846 (lines=5) @@
839
    {
840
        $result = Request::deleteWebhook();
841
842
        if (!$result->isOk()) {
843
            throw new TelegramException(
844
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
845
            );
846
        }
847
848
        return $result;
849
    }