Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 824-828 (lines=5) @@
821
822
        $result = Client::setWebhook($data);
823
824
        if (! $result->isOk()) {
825
            throw new TelegramException(
826
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
827
            );
828
        }
829
830
        return $result;
831
    }
@@ 843-847 (lines=5) @@
840
    {
841
        $result = Client::deleteWebhook();
842
843
        if (! $result->isOk()) {
844
            throw new TelegramException(
845
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
846
            );
847
        }
848
849
        return $result;
850
    }