@@ -36,7 +36,9 @@ |
||
36 | 36 | $method = Text::camelCase("get $offset"); |
37 | 37 | |
38 | 38 | // If it exists, call it and return its return value |
39 | - if (method_exists($this, $method)) return $this->{$method}(); |
|
39 | + if (method_exists($this, $method)) { |
|
40 | + return $this->{$method}(); |
|
41 | + } |
|
40 | 42 | |
41 | 43 | // If not return the data from the array after checking it is set |
42 | 44 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | * \brief Load a localization file into the localized strings array. |
34 | 34 | * @param $lang Language to load. |
35 | 35 | * @param $dir Directory in which there are the JSON files. |
36 | - * @return True if loaded. False if already loaded. |
|
36 | + * @return boolean if loaded. False if already loaded. |
|
37 | 37 | */ |
38 | 38 | protected function loadSingleLanguage(string $lang = 'en', $dir = './localization') : bool { |
39 | 39 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | * It also change $language parameter of the bot to the language returned. |
87 | 87 | * @param $default_language <i>Optional</i>. Default language to return in case of errors. |
88 | 88 | * @param $expiring_time <i>Optional</i>. Set the expiring time for the language on redis each time it is took from the sql database. |
89 | - * @return Language for the current user, $default_language on errors. |
|
89 | + * @return string for the current user, $default_language on errors. |
|
90 | 90 | */ |
91 | 91 | public function getLanguageRedis($default_language = 'en', $expiring_time = '86400') : string { |
92 | 92 |
@@ -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 | */ |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | /** |
47 | 47 | * \brief Use this method to get a list of administrators in a chat. |
48 | - * @param string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>) |
|
48 | + * @param string $_chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format <code>@channelusername</code>) |
|
49 | 49 | * @return Array|false On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. |
50 | 50 | */ |
51 | 51 | public function getChatAdministrators($_chat_id) { |
@@ -379,7 +379,7 @@ |
||
379 | 379 | /** |
380 | 380 | * \brief Set current chat ID. |
381 | 381 | * \details Change the chat ID on which the bot acts. |
382 | - * @param $_chat_id The new chat ID to set. |
|
382 | + * @param string $_chat_id The new chat ID to set. |
|
383 | 383 | */ |
384 | 384 | public function setChatID($_chat_id) { |
385 | 385 |
@@ -82,7 +82,7 @@ |
||
82 | 82 | |
83 | 83 | // Exec getUpdates |
84 | 84 | $this->execRequest('getUpdates?' . http_build_query($parameters) |
85 | - . '&allowed_updates=' . json_encode($allowed_updates)); |
|
85 | + . '&allowed_updates=' . json_encode($allowed_updates)); |
|
86 | 86 | |
87 | 87 | } |
88 | 88 |