Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 767-771 (lines=5) @@
764
765
        $result = Client::setWebhook($parameters);
766
767
        if (! $result->isOk()) {
768
            throw new TelegramException(
769
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
770
            );
771
        }
772
773
        return $result;
774
    }
@@ 786-790 (lines=5) @@
783
    {
784
        $result = Client::deleteWebhook();
785
786
        if (! $result->isOk()) {
787
            throw new TelegramException(
788
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
789
            );
790
        }
791
792
        return $result;
793
    }