@@ -18,18 +18,12 @@ |
||
18 | 18 | |
19 | 19 | namespace PhpBotFramework; |
20 | 20 | |
21 | -use PhpBotFramework\Exceptions\BotException; |
|
22 | - |
|
23 | 21 | // Use localized inline keyboard: this means you can display it in various languages. |
24 | 22 | use PhpBotFramework\Localization\Button; |
25 | - |
|
26 | 23 | use PhpBotFramework\Utilities\BotState; |
27 | - |
|
28 | 24 | use PhpBotFramework\Database\Database; |
29 | - |
|
30 | 25 | use PhpBotFramework\Database\Getter; |
31 | 26 | use PhpBotFramework\Database\LongPolling; |
32 | - |
|
33 | 27 | use PhpBotFramework\Localization\Localization; |
34 | 28 | |
35 | 29 | /** |
@@ -19,7 +19,6 @@ |
||
19 | 19 | namespace PhpBotFramework\Core; |
20 | 20 | |
21 | 21 | use PhpBotFramework\Entities\Message; |
22 | - |
|
23 | 22 | use PhpBotFramework\Entities\File as TelegramFile; |
24 | 23 | |
25 | 24 | /** |
@@ -35,7 +35,7 @@ |
||
35 | 35 | abstract protected function checkCurrentFile(TelegramFile $file); |
36 | 36 | |
37 | 37 | /** @internal |
38 | - * \brief Contains parameters of the next request. */ |
|
38 | + * \brief Contains parameters of the next request. */ |
|
39 | 39 | protected $parameters; |
40 | 40 | |
41 | 41 | /** |
@@ -19,7 +19,6 @@ |
||
19 | 19 | namespace PhpBotFramework\Database; |
20 | 20 | |
21 | 21 | use PhpBotFramework\BasicBot; |
22 | -use PhpBotFramework\Exceptions\BotException; |
|
23 | 22 | |
24 | 23 | define('PDO_DEFAULT_ADAPTER', 'mysql'); |
25 | 24 |
@@ -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 |
@@ -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 | /** |
@@ -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 | /** |