@@ -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 | /** |
@@ -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 | |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | public function offsetUnset($offset) |
| 42 | 42 | { |
| 43 | - /* Log a warning */ |
|
| 43 | + /* Log a warning */ |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -79,12 +79,12 @@ |
||
| 79 | 79 | // If we found a valid command (check first lenght, then use strpos) |
| 80 | 80 | if ($message_is_command && $this->length == $message['entities'][0]['length'] && |
| 81 | 81 | mb_strpos($this->command, $message['text'], $message['entities'][0]['offset']) !== false) { |
| 82 | - // Check that the user can execute the command |
|
| 83 | - if (in_array($message['from']['id'], $this->ids)) { |
|
| 82 | + // Check that the user can execute the command |
|
| 83 | + if (in_array($message['from']['id'], $this->ids)) { |
|
| 84 | 84 | return true; |
| 85 | - } else { |
|
| 85 | + } else { |
|
| 86 | 86 | return false; |
| 87 | - } |
|
| 87 | + } |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return false; |