Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 737-741 (lines=5) @@
734
735
        $result = Request::setWebhook($url, $path_certificate);
736
737
        if (!$result->isOk()) {
738
            throw new TelegramException(
739
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
740
            );
741
        }
742
743
        return $result;
744
    }
@@ 756-760 (lines=5) @@
753
    {
754
        $result = Request::setWebhook();
755
756
        if (!$result->isOk()) {
757
            throw new TelegramException(
758
                'Webhook was not unset! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
759
            );
760
        }
761
762
        return $result;
763
    }