Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 802-806 (lines=5) @@
799
800
        $result = Client::setWebhook($parameters);
801
802
        if (! $result->isOk()) {
803
            throw new TelegramException(
804
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
805
            );
806
        }
807
808
        return $result;
809
    }
@@ 821-825 (lines=5) @@
818
    {
819
        $result = Client::deleteWebhook();
820
821
        if (! $result->isOk()) {
822
            throw new TelegramException(
823
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
824
            );
825
        }
826
827
        return $result;
828
    }