Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 833-837 (lines=5) @@
830
831
        $result = Request::setWebhook($data);
832
833
        if (!$result->isOk()) {
834
            throw new TelegramException(
835
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
836
            );
837
        }
838
839
        return $result;
840
    }
@@ 852-856 (lines=5) @@
849
    {
850
        $result = Request::deleteWebhook();
851
852
        if (!$result->isOk()) {
853
            throw new TelegramException(
854
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
855
            );
856
        }
857
858
        return $result;
859
    }