Code Duplication    Length = 5-5 lines in 2 locations

src/Telegram.php 2 locations

@@ 828-832 (lines=5) @@
825
      
826
      $result = Request::setWebhook($data);
827
      
828
      if (!$result->isOk()) {
829
        throw new TelegramException(
830
          'Webhook was not set! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
831
        );
832
      }
833
      
834
      return $result;
835
    }
@@ 847-851 (lines=5) @@
844
    {
845
      $result = Request::deleteWebhook();
846
      
847
      if (!$result->isOk()) {
848
        throw new TelegramException(
849
          'Webhook was not deleted! Error: ' . $result->getErrorCode() . ' ' . $result->getDescription()
850
        );
851
      }
852
      
853
      return $result;
854
    }