Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 814-818 (lines=5) @@
811
812
        $result = Request::setWebhook($data);
813
814
        if (!$result->isOk()) {
815
            throw new TelegramException(
816
                'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
817
            );
818
        }
819
820
        return $result;
821
    }
@@ 833-837 (lines=5) @@
830
    {
831
        $result = Request::deleteWebhook();
832
833
        if (!$result->isOk()) {
834
            throw new TelegramException(
835
                'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
836
            );
837
        }
838
839
        return $result;
840
    }