Completed
Pull Request — develop (#397)
by
unknown
02:55
created
src/Request.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 'first_name' => 'botname',
165 165
                 'username'   => 'namebot',
166 166
             ];
167
-            $data['chat']       = ['id' => $data['chat_id']];
167
+            $data['chat'] = ['id' => $data['chat_id']];
168 168
 
169 169
             $fake_response['result'] = $data;
170 170
         }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $multipart = [];
189 189
 
190 190
         // Convert any nested arrays into JSON strings.
191
-        array_walk($data, function (&$item) {
191
+        array_walk($data, function(&$item) {
192 192
             is_array($item) && $item = json_encode($item);
193 193
         });
194 194
 
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
      */
822 822
     public static function setWebhook($url = '', array $data = [])
823 823
     {
824
-        $data        = array_intersect_key($data, array_flip([
824
+        $data = array_intersect_key($data, array_flip([
825 825
             'certificate',
826 826
             'max_connections',
827 827
             'allowed_updates',
@@ -1043,9 +1043,9 @@  discard block
 block discarded – undo
1043 1043
                     $requests = DB::getTelegramRequestCount($chat_id, $inline_message_id);
1044 1044
 
1045 1045
                     if (
1046
-                        $requests['LIMIT_PER_SEC'] == 0 &&  // No more than one message per second inside a particular chat
1046
+                        $requests['LIMIT_PER_SEC'] == 0 && // No more than one message per second inside a particular chat
1047 1047
                         (
1048
-                            (($chat_id > 0 || $inline_message_id) && $requests['LIMIT_PER_SEC_ALL'] < 30) ||  // No more than 30 messages per second globally
1048
+                            (($chat_id > 0 || $inline_message_id) && $requests['LIMIT_PER_SEC_ALL'] < 30) || // No more than 30 messages per second globally
1049 1049
                             ($chat_id < 0 && $requests['LIMIT_PER_MINUTE'] < 20)  // No more than 20 messages per minute for group chats
1050 1050
                         )
1051 1051
                     ) {
Please login to merge, or discard this patch.