Commit b1c17cae authored by Avtandil Kikabidze's avatar Avtandil Kikabidze

Fixed code style by phpcbf

parent 7ddb9386
...@@ -60,7 +60,7 @@ class WeatherCommand extends UserCommand ...@@ -60,7 +60,7 @@ class WeatherCommand extends UserCommand
throw new TelegramException($e->getMessage()); throw new TelegramException($e->getMessage());
} }
return (string)$response->getBody(); return (string) $response->getBody();
} }
/** /**
......
...@@ -296,8 +296,11 @@ class DB ...@@ -296,8 +296,11 @@ class DB
$sth_insert_telegram_update->bindParam(':chat_id', $chat_id, PDO::PARAM_INT); $sth_insert_telegram_update->bindParam(':chat_id', $chat_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':message_id', $message_id, PDO::PARAM_INT); $sth_insert_telegram_update->bindParam(':message_id', $message_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':inline_query_id', $inline_query_id, PDO::PARAM_INT); $sth_insert_telegram_update->bindParam(':inline_query_id', $inline_query_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':chosen_inline_result_id', $chosen_inline_result_id, $sth_insert_telegram_update->bindParam(
PDO::PARAM_INT); ':chosen_inline_result_id',
$chosen_inline_result_id,
PDO::PARAM_INT
);
$sth_insert_telegram_update->bindParam(':callback_query_id', $callback_query_id, PDO::PARAM_INT); $sth_insert_telegram_update->bindParam(':callback_query_id', $callback_query_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':edited_message_id', $edited_message_id, PDO::PARAM_INT); $sth_insert_telegram_update->bindParam(':edited_message_id', $edited_message_id, PDO::PARAM_INT);
...@@ -458,8 +461,15 @@ class DB ...@@ -458,8 +461,15 @@ class DB
if (self::insertChosenInlineResultRequest($chosen_inline_result)) { if (self::insertChosenInlineResultRequest($chosen_inline_result)) {
$chosen_inline_result_local_id = self::$pdo->lastInsertId(); $chosen_inline_result_local_id = self::$pdo->lastInsertId();
return self::insertTelegramUpdate($update_id, null, null, null, $chosen_inline_result_local_id, null, return self::insertTelegramUpdate(
null); $update_id,
null,
null,
null,
$chosen_inline_result_local_id,
null,
null
);
} }
} elseif ($update->getUpdateType() == 'callback_query') { } elseif ($update->getUpdateType() == 'callback_query') {
$callback_query = $update->getCallbackQuery(); $callback_query = $update->getCallbackQuery();
...@@ -474,8 +484,15 @@ class DB ...@@ -474,8 +484,15 @@ class DB
if (self::insertEditedMessageRequest($edited_message)) { if (self::insertEditedMessageRequest($edited_message)) {
$chat_id = $edited_message->getChat()->getId(); $chat_id = $edited_message->getChat()->getId();
$edited_message_local_id = self::$pdo->lastInsertId(); $edited_message_local_id = self::$pdo->lastInsertId();
return self::insertTelegramUpdate($update_id, $chat_id, null, null, null, null, return self::insertTelegramUpdate(
$edited_message_local_id); $update_id,
$chat_id,
null,
null,
null,
null,
$edited_message_local_id
);
} }
} }
......
...@@ -176,7 +176,7 @@ class Request ...@@ -176,7 +176,7 @@ class Request
//Fix so that the keyboard markup is a string, not an object //Fix so that the keyboard markup is a string, not an object
if (isset($data['reply_markup']) && !is_string($data['reply_markup'])) { if (isset($data['reply_markup']) && !is_string($data['reply_markup'])) {
$data['reply_markup'] = (string)$data['reply_markup']; $data['reply_markup'] = (string) $data['reply_markup'];
} }
$request_params = ['debug' => $debug_handle]; $request_params = ['debug' => $debug_handle];
......
...@@ -307,7 +307,7 @@ class Telegram ...@@ -307,7 +307,7 @@ class Telegram
if ($response->isOk()) { if ($response->isOk()) {
//Process all updates //Process all updates
foreach ((array)$response->getResult() as $result) { foreach ((array) $response->getResult() as $result) {
$this->processUpdate($result); $this->processUpdate($result);
} }
} }
......
...@@ -160,10 +160,12 @@ class TelegramLog ...@@ -160,10 +160,12 @@ class TelegramLog
{ {
if (self::$debug_log_temp_stream_handle !== null) { if (self::$debug_log_temp_stream_handle !== null) {
rewind(self::$debug_log_temp_stream_handle); rewind(self::$debug_log_temp_stream_handle);
self::debug(sprintf( self::debug(
sprintf(
$message, $message,
stream_get_contents(self::$debug_log_temp_stream_handle) stream_get_contents(self::$debug_log_temp_stream_handle)
)); )
);
fclose(self::$debug_log_temp_stream_handle); fclose(self::$debug_log_temp_stream_handle);
self::$debug_log_temp_stream_handle = null; self::$debug_log_temp_stream_handle = null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment