@@ -200,8 +200,8 @@ |
||
200 | 200 | public static function escapeMarkdown(string $string): string |
201 | 201 | { |
202 | 202 | return str_replace( |
203 | - ['[', '`', '*', '_',], |
|
204 | - ['\[', '\`', '\*', '\_',], |
|
203 | + ['[', '`', '*', '_', ], |
|
204 | + ['\[', '\`', '\*', '\_', ], |
|
205 | 205 | $string |
206 | 206 | ); |
207 | 207 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | } |
428 | 428 | |
429 | 429 | if ($this->last_update_id !== null) { |
430 | - $offset = $this->last_update_id + 1; //As explained in the telegram bot API documentation |
|
430 | + $offset = $this->last_update_id + 1; //As explained in the telegram bot API documentation |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | $response = Request::getUpdates([ |
@@ -890,7 +890,7 @@ discard block |
||
890 | 890 | throw new TelegramException('Hook url is empty!'); |
891 | 891 | } |
892 | 892 | |
893 | - $data = array_intersect_key($data, array_flip([ |
|
893 | + $data = array_intersect_key($data, array_flip([ |
|
894 | 894 | 'certificate', |
895 | 895 | 'max_connections', |
896 | 896 | 'allowed_updates', |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | // Give bot access to admin commands |
1007 | 1007 | $this->enableAdmin($bot_id); |
1008 | 1008 | |
1009 | - $newUpdate = static function ($text = '') use ($bot_id, $bot_name, $bot_username) { |
|
1009 | + $newUpdate = static function($text = '') use ($bot_id, $bot_name, $bot_username) { |
|
1010 | 1010 | return new Update([ |
1011 | 1011 | 'update_id' => 0, |
1012 | 1012 | 'message' => [ |
@@ -1026,8 +1026,8 @@ discard block |
||
1026 | 1026 | ]); |
1027 | 1027 | }; |
1028 | 1028 | |
1029 | - $this->update = $newUpdate(); // Required for isAdmin() check inside getCommandObject() |
|
1030 | - $this->commands_objects = $this->getCommandsList(); // Load up-to-date commands list |
|
1029 | + $this->update = $newUpdate(); // Required for isAdmin() check inside getCommandObject() |
|
1030 | + $this->commands_objects = $this->getCommandsList(); // Load up-to-date commands list |
|
1031 | 1031 | |
1032 | 1032 | foreach ($commands as $command) { |
1033 | 1033 | $this->update = $newUpdate($command); |