@@ -22,8 +22,6 @@ |
||
| 22 | 22 | * \addtogroup Modules |
| 23 | 23 | * @{ |
| 24 | 24 | */ |
| 25 | -use PhpBotFramework\Exceptions\BotException; |
|
| 26 | - |
|
| 27 | 25 | use PhpBotFramework\BasicBot; |
| 28 | 26 | |
| 29 | 27 | /** |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | * @{ |
| 87 | 87 | */ |
| 88 | 88 | |
| 89 | - public function __construct(BasicBot &$bot) |
|
| 89 | + public function __construct(BasicBot & $bot) |
|
| 90 | 90 | { |
| 91 | 91 | $this->bot = $bot; |
| 92 | 92 | } |
@@ -38,15 +38,15 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | |
| 40 | 40 | /** @internal |
| 41 | - * \brief Reference to the bot. */ |
|
| 41 | + * \brief Reference to the bot. */ |
|
| 42 | 42 | protected $bot; |
| 43 | 43 | |
| 44 | 44 | /** @internal |
| 45 | - * \brief Current user/group language. */ |
|
| 45 | + * \brief Current user/group language. */ |
|
| 46 | 46 | public $language; |
| 47 | 47 | |
| 48 | 48 | /** @internal |
| 49 | - * \brief Store the localizated strings. */ |
|
| 49 | + * \brief Store the localizated strings. */ |
|
| 50 | 50 | protected $local; |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | |
| 48 | 48 | /** @internal |
| 49 | - * \brief Store the localized strings. */ |
|
| 49 | + * \brief Store the localized strings. */ |
|
| 50 | 50 | protected $local; |
| 51 | 51 | |
| 52 | 52 | /** \brief Source for localization files. */ |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | // Get the language from the bot |
| 64 | 64 | $sth = $pdo->prepare('SELECT language FROM ' . $this->user_table . ' WHERE ' |
| 65 | - . $this->id_column . ' = :chat_id'); |
|
| 65 | + . $this->id_column . ' = :chat_id'); |
|
| 66 | 66 | |
| 67 | 67 | $chat_id = $this->bot->getChatID(); |
| 68 | 68 | $sth->bindParam(':chat_id', $chat_id); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | // Update the language in the database |
| 97 | 97 | $sth = $pdo->prepare('UPDATE ' . $this->user_table . ' SET language = :language WHERE ' |
| 98 | - . $this->id_column . ' = :id'); |
|
| 98 | + . $this->id_column . ' = :id'); |
|
| 99 | 99 | $sth->bindParam(':language', $language); |
| 100 | 100 | |
| 101 | 101 | $chat_id = $this->bot->getChatID(); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** \brief Current user/group language. */ |
| 48 | 48 | public $language; |
| 49 | 49 | |
| 50 | - public function __construct(BasicBot &$bot) |
|
| 50 | + public function __construct(BasicBot & $bot) |
|
| 51 | 51 | { |
| 52 | 52 | $this->bot = $bot; |
| 53 | 53 | } |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | abstract protected function sanitizeUserTable(); |
| 39 | 39 | |
| 40 | 40 | /** @internal |
| 41 | - * \brief PDO connection to the database. */ |
|
| 41 | + * \brief PDO connection to the database. */ |
|
| 42 | 42 | public $pdo; |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * \brief Create a Database handler object. |
| 48 | 48 | * @param BasicBot $bot Reference to the bot that use this object. |
| 49 | 49 | */ |
| 50 | - public function __construct(BasicBot &$bot) |
|
| 50 | + public function __construct(BasicBot & $bot) |
|
| 51 | 51 | { |
| 52 | 52 | $this->bot = $bot; |
| 53 | 53 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | protected function addDefaultValue(array $params) : array |
| 94 | 94 | { |
| 95 | - static $defaults = [ 'adapter' => PDO_DEFAULT_ADAPTER, 'host' => 'localhost', 'options' => [] ]; |
|
| 95 | + static $defaults = ['adapter' => PDO_DEFAULT_ADAPTER, 'host' => 'localhost', 'options' => []]; |
|
| 96 | 96 | return array_merge($defaults, $params); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | abstract protected function execRequest(string $url); |
| 30 | 30 | |
| 31 | 31 | /** @internal |
| 32 | - * \brief Store ID of the callback query received. */ |
|
| 32 | + * \brief Store ID of the callback query received. */ |
|
| 33 | 33 | protected $_callback_query_id; |
| 34 | 34 | |
| 35 | 35 | /** @internal |
| 36 | - * \brief Store ID of the inline query received. */ |
|
| 36 | + * \brief Store ID of the inline query received. */ |
|
| 37 | 37 | protected $_inline_query_id; |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | abstract protected function execRequest(string $url); |
| 28 | 28 | |
| 29 | 29 | /** @internal |
| 30 | - * \brief Contains parameters of the next request. */ |
|
| 30 | + * \brief Contains parameters of the next request. */ |
|
| 31 | 31 | protected $parameters; |
| 32 | 32 | |
| 33 | 33 | /** |