Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 807-811 (lines=5) @@
804
805
        $result = Request::setWebhook($data);
806
807
        if (!$result->isOk()) {
808
            throw new TelegramException(
809
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
810
            );
811
        }
812
813
        return $result;
814
    }
@@ 826-830 (lines=5) @@
823
    {
824
        $result = Request::deleteWebhook();
825
826
        if (!$result->isOk()) {
827
            throw new TelegramException(
828
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
829
            );
830
        }
831
832
        return $result;
833
    }