Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 850-854 (lines=5) @@
847
848
        $result = Request::setWebhook($data);
849
850
        if (!$result->isOk()) {
851
            throw new TelegramException(
852
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
853
            );
854
        }
855
856
        return $result;
857
    }
@@ 869-873 (lines=5) @@
866
    {
867
        $result = Request::deleteWebhook();
868
869
        if (!$result->isOk()) {
870
            throw new TelegramException(
871
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
872
            );
873
        }
874
875
        return $result;
876
    }