@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | $this->initCommands(); |
| 77 | 77 | |
| 78 | - // Process all updates received |
|
| 78 | + // Process all updates received |
|
| 79 | 79 | while (true) { |
| 80 | 80 | |
| 81 | 81 | $updates = $this->getUpdates($offset, $limit, $timeout); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * \brief (<i>Internal</i>)Get first update offset in redis. |
| 47 | 47 | * \details Called by getUpdatesRedis to get the offset saved in redis or to get it from telegram and save it in redis. |
| 48 | 48 | * @param $offset_key Name of the variable where the offset is saved on Redis |
| 49 | - * @return Id of the first update to process. |
|
| 49 | + * @return integer of the first update to process. |
|
| 50 | 50 | */ |
| 51 | 51 | protected function getUpdateOffsetRedis(string $offset_key) : int |
| 52 | 52 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * \details Called by getUpdatesDatabase to get the offset saved in database or to get it from telegram and save it in database. |
| 116 | 116 | * @param $table_name Name of the table where offset is saved in the database |
| 117 | 117 | * @param $column_name Name of the column where the offset is saved in the database |
| 118 | - * @return Id of the first update to process. |
|
| 118 | + * @return integer of the first update to process. |
|
| 119 | 119 | */ |
| 120 | 120 | protected function getUpdateOffsetDatabase(string $table_name, string $column_name) : int |
| 121 | 121 | { |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace PhpBotFramework\Test; |
| 4 | 4 | |
| 5 | -use PhpBotFramework\Entities\Message; |
|
| 6 | - |
|
| 7 | 5 | /* \class FakeUpdate |
| 8 | 6 | * \brief Contains abstrataction methods for processing fake updates. |
| 9 | 7 | */ |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace PhpBotFramework\Core; |
| 4 | 4 | |
| 5 | 5 | use PhpBotFramework\Exceptions\BotException; |
| 6 | - |
|
| 7 | 6 | use PhpBotFramework\Entities\Message; |
| 8 | 7 | use PhpBotFramework\Entities\CallbackQuery; |
| 9 | 8 | use PhpBotFramework\Entities\ChosenInlineResult; |
@@ -232,7 +232,6 @@ |
||
| 232 | 232 | * \brief Called every time a post get edited in the channel where the bot is in. |
| 233 | 233 | * \details Override it to script the bot answer for each post edited in a channel. |
| 234 | 234 | * <code>$chat_id</code> set inside of this function. |
| 235 | - * @param Message $post The message edited in the channel. |
|
| 236 | 235 | */ |
| 237 | 236 | protected function processEditedChannelPost(Message $edited_post) |
| 238 | 237 | { |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | /** |
| 64 | 64 | * \brief (<i>Internal</i>) Process the message to check if it triggers a command of this type. |
| 65 | 65 | * @param $message Message to process. |
| 66 | - * @return True if the message triggered a command. |
|
| 66 | + * @return boolean if the message triggered a command. |
|
| 67 | 67 | */ |
| 68 | 68 | protected function processMessageRegexCommand(array $message) : bool |
| 69 | 69 | { |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | * @param $reply_markup Inline keyboard object (Not JSON serialized, use getArray from InlineKeyboard class). |
| 63 | 63 | * @param $parse_mode <i>Optional</i>. Formattation of the message. |
| 64 | 64 | * @param $disable_web_preview <i>Optional</i>. Disables link previews for links in the sent message |
| 65 | - * @return Id the the article added |
|
| 65 | + * @return integer the the article added |
|
| 66 | 66 | */ |
| 67 | 67 | public function newArticle($title, $message_text, $description = '', array $reply_markup = null, $parse_mode = 'HTML', $disable_web_preview = false) |
| 68 | 68 | { |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * It also change $language parameter of the bot to the language returned. |
| 93 | 93 | * @param $default_language <i>Optional</i>. Default language to return in case of errors. |
| 94 | 94 | * @param $expiring_time <i>Optional</i>. Set the expiring time for the language on redis each time it is took from the sql database. |
| 95 | - * @return Language for the current user, $default_language on errors. |
|
| 95 | + * @return string for the current user, $default_language on errors. |
|
| 96 | 96 | */ |
| 97 | 97 | public function getLanguageRedis($default_language = 'en', $expiring_time = '86400') : string |
| 98 | 98 | { |
@@ -148,8 +148,8 @@ |
||
| 148 | 148 | |
| 149 | 149 | // If the user has already added a button in this row |
| 150 | 150 | if ($this->column != 0) { |
| 151 | - // Change row |
|
| 152 | - $this->changeRow(); |
|
| 151 | + // Change row |
|
| 152 | + $this->changeRow(); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | // Add buttons to the next row |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @return The object created with the buttons passed. |
| 59 | 59 | */ |
| 60 | 60 | public function __construct( |
| 61 | - \PhpBotFramework\Bot &$bot = null, |
|
| 61 | + \PhpBotFramework\Bot & $bot = null, |
|
| 62 | 62 | array $buttons = array() |
| 63 | 63 | ) { |
| 64 | 64 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | { |
| 226 | 226 | |
| 227 | 227 | // Create the button |
| 228 | - $inline_keyboard = [ 'inline_keyboard' => |
|
| 228 | + $inline_keyboard = ['inline_keyboard' => |
|
| 229 | 229 | [ |
| 230 | 230 | [ |
| 231 | 231 | [ |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | { |
| 255 | 255 | |
| 256 | 256 | // Create the keyboard |
| 257 | - $inline_keyboard = [ 'inline_keyboard' => |
|
| 257 | + $inline_keyboard = ['inline_keyboard' => |
|
| 258 | 258 | [ |
| 259 | 259 | [ |
| 260 | 260 | [ |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | protected function mergeWithDefaults($params) |
| 64 | 64 | { |
| 65 | - $DEFAULTS = [ 'adapter' => 'mysql', 'host' => 'localhost' ]; |
|
| 65 | + $DEFAULTS = ['adapter' => 'mysql', 'host' => 'localhost']; |
|
| 66 | 66 | return array_merge($DEFAULTS, $params); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | |
| 101 | 101 | // Exec getUpdates |
| 102 | 102 | $this->execRequest('getUpdates?' . http_build_query($parameters) |
| 103 | - . '&allowed_updates=' . json_encode($allowed_updates)); |
|
| 103 | + . '&allowed_updates=' . json_encode($allowed_updates)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** @} */ |