@@ -199,8 +199,8 @@ |
||
199 | 199 | public function escapeMarkdown($string) |
200 | 200 | { |
201 | 201 | return str_replace( |
202 | - ['[', '`', '*', '_',], |
|
203 | - ['\[', '\`', '\*', '\_',], |
|
202 | + ['[', '`', '*', '_', ], |
|
203 | + ['\[', '\`', '\*', '\_', ], |
|
204 | 204 | $string |
205 | 205 | ); |
206 | 206 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | } |
291 | 291 | |
292 | 292 | // Convert each Entity item into an object based on its JSON reflection |
293 | - $json_entities = array_map(function ($entity) { |
|
293 | + $json_entities = array_map(function($entity) { |
|
294 | 294 | return json_decode($entity, true); |
295 | 295 | }, $entities); |
296 | 296 | |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | if (null !== $select['text']) { |
1045 | 1045 | $text_like = '%' . strtolower($select['text']) . '%'; |
1046 | 1046 | if ($select['users']) { |
1047 | - $where[] = '( |
|
1047 | + $where[] = '( |
|
1048 | 1048 | LOWER(' . TB_CHAT . '.`title`) LIKE :text1 |
1049 | 1049 | OR LOWER(' . TB_USER . '.`first_name`) LIKE :text2 |
1050 | 1050 | OR LOWER(' . TB_USER . '.`last_name`) LIKE :text3 |
@@ -856,7 +856,7 @@ |
||
856 | 856 | protected function ucfirstUnicode($str, $encoding = 'UTF-8') |
857 | 857 | { |
858 | 858 | return mb_strtoupper(mb_substr($str, 0, 1, $encoding), $encoding) |
859 | - . mb_strtolower(mb_substr($str, 1, mb_strlen($str), $encoding), $encoding); |
|
859 | + . mb_strtolower(mb_substr($str, 1, mb_strlen($str), $encoding), $encoding); |
|
860 | 860 | } |
861 | 861 | |
862 | 862 | /** |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | |
355 | 355 | if ($this->last_update_id !== null) { |
356 | - $offset = $this->last_update_id + 1; //As explained in the telegram bot API documentation |
|
356 | + $offset = $this->last_update_id + 1; //As explained in the telegram bot API documentation |
|
357 | 357 | } |
358 | 358 | |
359 | 359 | $response = Request::getUpdates( |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | throw new TelegramException('Hook url is empty!'); |
806 | 806 | } |
807 | 807 | |
808 | - $data = array_intersect_key($data, array_flip([ |
|
808 | + $data = array_intersect_key($data, array_flip([ |
|
809 | 809 | 'certificate', |
810 | 810 | 'max_connections', |
811 | 811 | 'allowed_updates', |
@@ -919,8 +919,8 @@ discard block |
||
919 | 919 | } |
920 | 920 | |
921 | 921 | |
922 | - $this->enableAdmin($bot_id); // Give bot access to admin commands |
|
923 | - $this->getCommandsList(); // Load full commands list |
|
922 | + $this->enableAdmin($bot_id); // Give bot access to admin commands |
|
923 | + $this->getCommandsList(); // Load full commands list |
|
924 | 924 | |
925 | 925 | foreach ($commands as $command) { |
926 | 926 | $this->update = new Update( |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | 'first_name' => 'botname', |
339 | 339 | 'username' => 'namebot', |
340 | 340 | ]; |
341 | - $data['chat'] = ['id' => $data['chat_id']]; |
|
341 | + $data['chat'] = ['id' => $data['chat_id']]; |
|
342 | 342 | |
343 | 343 | $fake_response['result'] = $data; |
344 | 344 | } |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | '/bot' . self::$telegram->getApiKey() . '/' . $action, |
492 | 492 | $request_params |
493 | 493 | ); |
494 | - $result = (string) $response->getBody(); |
|
494 | + $result = (string) $response->getBody(); |
|
495 | 495 | |
496 | 496 | //Logging getUpdates Update |
497 | 497 | if ($action === 'getUpdates') { |
@@ -844,9 +844,9 @@ discard block |
||
844 | 844 | // Make sure we're handling integers here. |
845 | 845 | $requests = array_map('intval', $requests); |
846 | 846 | |
847 | - $chat_per_second = ($requests['LIMIT_PER_SEC'] === 0); // No more than one message per second inside a particular chat |
|
847 | + $chat_per_second = ($requests['LIMIT_PER_SEC'] === 0); // No more than one message per second inside a particular chat |
|
848 | 848 | $global_per_second = ($requests['LIMIT_PER_SEC_ALL'] < 30); // No more than 30 messages per second to different chats |
849 | - $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || $inline_message_id !== null) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20)); // No more than 20 messages per minute in groups and channels |
|
849 | + $groups_per_minute = (((is_numeric($chat_id) && $chat_id > 0) || $inline_message_id !== null) || ((!is_numeric($chat_id) || $chat_id < 0) && $requests['LIMIT_PER_MINUTE'] < 20)); // No more than 20 messages per minute in groups and channels |
|
850 | 850 | |
851 | 851 | if ($chat_per_second && $global_per_second && $groups_per_minute) { |
852 | 852 | break; |
@@ -27,7 +27,6 @@ |
||
27 | 27 | * @method string getType() Poll type, currently can be “regular” or “quiz” |
28 | 28 | * @method bool getAllowsMultipleAnswers() True, if the poll allows multiple answers |
29 | 29 | * @method int getCorrectOptionId() Optional. 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. |
30 | - |
|
31 | 30 | */ |
32 | 31 | class Poll extends Entity |
33 | 32 | { |