Completed
Push — bot_api_3.0 ( efc501...2fd8c0 )
by Armando
02:41
created
src/Telegram.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -801,7 +801,7 @@
 block discarded – undo
801 801
     /**
802 802
      * Delete any assigned webhook
803 803
      *
804
-     * @return mixed
804
+     * @return ServerResponse
805 805
      * @throws \Longman\TelegramBot\Exception\TelegramException
806 806
      */
807 807
     public function deleteWebhook()
Please login to merge, or discard this patch.
src/Request.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 'first_name' => 'botname',
189 189
                 'username'   => 'namebot',
190 190
             ];
191
-            $data['chat']       = ['id' => $data['chat_id']];
191
+            $data['chat'] = ['id' => $data['chat_id']];
192 192
 
193 193
             $fake_response['result'] = $data;
194 194
         }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $multipart = [];
213 213
 
214 214
         // Convert any nested arrays into JSON strings.
215
-        array_walk($data, function (&$item) {
215
+        array_walk($data, function(&$item) {
216 216
             is_array($item) && $item = json_encode($item);
217 217
         });
218 218
 
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
      */
850 850
     public static function setWebhook($url = '', array $data = [])
851 851
     {
852
-        $data        = array_intersect_key($data, array_flip([
852
+        $data = array_intersect_key($data, array_flip([
853 853
             'certificate',
854 854
             'max_connections',
855 855
             'allowed_updates',
@@ -1077,8 +1077,8 @@  discard block
 block discarded – undo
1077 1077
                     $requests = DB::getTelegramRequestCount($chat_id, $inline_message_id);
1078 1078
 
1079 1079
                     $chat_per_second = ($requests['LIMIT_PER_SEC'] == 0); // No more than one message per second inside a particular chat
1080
-                    $global_per_second = ($requests['LIMIT_PER_SEC_ALL'] < 30);    // No more than 30 messages per second to different chats
1081
-                    $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || !is_null($inline_message_id)) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20));    // No more than 20 messages per minute in groups and channels
1080
+                    $global_per_second = ($requests['LIMIT_PER_SEC_ALL'] < 30); // No more than 30 messages per second to different chats
1081
+                    $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || !is_null($inline_message_id)) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20)); // No more than 20 messages per minute in groups and channels
1082 1082
 
1083 1083
                     if ($chat_per_second && $global_per_second && $groups_per_minute) {
1084 1084
                         break;
Please login to merge, or discard this patch.