Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 832-836 (lines=5) @@
829
    {
830
        $result = Request::deleteWebhook();
831
832
        if (!$result->isOk()) {
833
            throw new TelegramException(
834
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
835
            );
836
        }
837
838
        return $result;
839
    }
@@ 813-817 (lines=5) @@
810
811
        $result = Request::setWebhook($data);
812
813
        if (!$result->isOk()) {
814
            throw new TelegramException(
815
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
816
            );
817
        }
818
819
        return $result;
820
    }