@@ -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 | /** |
@@ -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 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * \brief Create a Database handler object. |
50 | 50 | * @param BasicBot $bot Reference to the bot that use this object. |
51 | 51 | */ |
52 | - public function __construct(BasicBot &$bot) |
|
52 | + public function __construct(BasicBot & $bot) |
|
53 | 53 | { |
54 | 54 | $this->bot = $bot; |
55 | 55 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public static function addDefaultValue(array $params) : array |
96 | 96 | { |
97 | - static $defaults = [ 'adapter' => PDO_DEFAULT_ADAPTER, 'host' => 'localhost', 'options' => [] ]; |
|
97 | + static $defaults = ['adapter' => PDO_DEFAULT_ADAPTER, 'host' => 'localhost', 'options' => []]; |
|
98 | 98 | return array_merge($defaults, $params); |
99 | 99 | } |
100 | 100 |
@@ -20,8 +20,8 @@ |
||
20 | 20 | |
21 | 21 | private function prepareResponse($user) { |
22 | 22 | return '<strong>Message sent by </strong>' . $user['first_name'] . "\n" . |
23 | - '<strong>User ID: </strong>' . $user['id'] . "\n" . |
|
24 | - '<strong>Username: </strong>' . $user['username'] . "\n"; |
|
23 | + '<strong>User ID: </strong>' . $user['id'] . "\n" . |
|
24 | + '<strong>Username: </strong>' . $user['username'] . "\n"; |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | // Add a welcome message |
31 | 31 | $start_command = new PhpBotFramework\Commands\MessageCommand('start', |
32 | - function ($bot, $message) { |
|
32 | + function($bot, $message) { |
|
33 | 33 | $bot->sendMessage('<strong>Hey there!</strong> Send or forward me a text message :)'); |
34 | 34 | } |
35 | 35 | ); |